[R] Times series data file?
Douglas M. Hultstrand
dmhultst at metstat.com
Mon Jun 14 22:45:02 CEST 2010
Hello,
I currently splitting a file into individual files (time series each
separated into one file), the file I read in skips the first four lines
and extracts the data columns I need. I was wondering if there is a way
for R to automatically scan and separate the files based on the head
information?
The header delineates the observation with a 254 space time space day
space month space year.
254 0 26 NOV 1995
I would like to then use the program I have written to do the analysis.
I have attached a small subset text file of data (two observations).
Any thoughts would be very helpful.
# Read in data file
data <- read.table("file.txt", skip=4, header=F)
temp <- data$V4
elev <- data$V3
Thank you,
Doug
--
---------------------------------
Douglas M. Hultstrand, MS
Senior Hydrometeorologist
Metstat, Inc. Windsor, Colorado
voice: 720.771.5840
email: dmhultst at metstat.com
web: http://www.metstat.com
---------------------------------
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: file.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100614/7227b40e/attachment.txt>
More information about the R-help
mailing list