Hi,
I'm relatively new to R and need to some help in converting some of my data
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 measurement
instruments. The first column is the year fraction and extends over 2 years
with a new data point being collected roughly every 2 minutes. Lots of data
are recorded in the subsequent columns (such as met info) and
concentrations of particular atmospheric species (which I want to run STL
on).
Here's my initial code:
*#Read in file as an object, defined "BHD" from original file*
*BHD <- read.csv("C:/Work/PhD/R_Directory/BHD_2009_2012_all_samp_cal.csv",
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
Barney
--
Thomas Barningham
Centre for Ocean and Atmospheric Sciences
School of Environmental Sciences
University of East Anglia
Norwich Research Park
Norwich
NR4 7TJ
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.