[R] Time Series STL

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sat Jan 11 07:52:16 CET 2014

This might not seem helpful, but there really is a communication gap here. You need to read the Posting Guide, post in plain text so your example code is not mangled by the HTML, and include a bit of data that is representative of the data you are working with. You may find some helpful advice here: http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example, including how to use the dput function.
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

Thomas Barningham <stbarningham at gmail.com> wrote:
>I'm relatively new to R and need to some help in converting some of my
>into a ts object that can then be used to run an STL analysis.
>My initial input file is a .csv output from some atmospheric
>instruments. The first column is the year fraction and extends over 2
>with a new data point being collected roughly every 2 minutes. Lots of
>are recorded in the subsequent columns (such as met info) and
>concentrations of particular atmospheric species (which I want to run
>Here's my initial code:
>*#Read in file as an object, defined "BHD" from original file*
>*BHD <-
>header=T, dec=".", sep=",")*
>*#Define Columns from original files (comment out if using IDL output)*
>*yearfrac <- BHD[,1]*
>*APO <- BHD[,30]*
>*O2 <- BHD [,29]*
>*CO2 <- BHD[,28]*
>(end of code)
>What I want to do is take the objects defined above (APO, CO2, O2) and
>perform stl analyses on them, but I need to convert them to time series
>objects first based on the information in the yearfrac object.
>How do I go about this?!
>Thanks in advance

More information about the R-help mailing list