Reading Monthly zoo Series
read.yearmon.RdRead a text file containing monthly data with a date column and return a zoo object with index = a yearmon series with the dates read as names.
Arguments
- file
character giving the name of the file which the data are to be read from/written to. See
read.tableandwrite.tablefor more information.- format
date format argument passed to
as.Date.character.- tz
time zone argument passed to
as.POSIXct.- FUN
a function for computing the index from the first column of the data. See details.
- regular
logical. Should the series be coerced to class
"zooreg"(if the series is regular)?- index.column
integer. The column of the data frame in which the index/time is stored.
- ...
further arguments passed to
read.tableorwrite.table, respectively.
Details
The arguments are as for read.zoo:
TS <- read.zoo(...)
zoo(coredata(TS), as.yearmon2(index(TS)))