| read.timeblob {hydrosanity} | R Documentation |
Read in a timeblob (time series) from a file.
read.timeblob(file, skip = 1, sep = ",", sitename = NULL, dataname = "Data",
dataCol = 2, qualCol = 3, extraCols = c(),
extraNames = paste("Extra", extraCols), readTimesFromFile = T,
timeCol = 1, timeFormat = "%d %b %Y", startTime = NA,
tz = "GMT", timeSeqBy = "days", timeOffset = NULL, ...)
file |
path to a file, or a connection. |
skip |
number of lines in file before data begins. |
sep |
column separator, see read.table. |
sitename |
site name attribute. |
dataname |
data name attribute. |
dataCol |
file column number (starting from 1) containing data. |
qualCol |
file column number (starting from 1) containing quality codes. |
extraCols |
a vector of other file column numbers to read in. |
extraNames |
names of the columns given above. |
readTimesFromFile |
whether to read time series times from the file (column timeCol). |
timeCol |
used when readTimesFromFile = TRUE.
It should give the file column number (starting from 1) containing times. |
timeFormat |
format of times in timeCol: see strptime. |
startTime |
used when readTimesFromFile = FALSE.
It should be (coercible to) a POSIXt object, or else be a list like
list(year=1,month=2,day=3) (etc) where these give column numbers to read
the start time components (from the first line in file). |
tz |
timezone, see POSIXt. |
timeSeqBy |
time step to go with startTime, passed to seq.POSIXt. |
timeOffset |
a difftime object to add to the times. |
... |
passed to read.table. |
An object of class timeblob. It is just a data.frame with some extra attributes.
Felix Andrews felix@nfrac.org