read.xts | R Documentation |
Read a text file using fread
and directly save it as xts
object.
read.xts(
x,
datecolumns = 1,
format = "%Y-%m-%d %H:%M",
header = TRUE,
tz = "utc",
skip = 0,
cut.prefix = 0,
...
)
x |
character string. file to load |
datecolumns |
integer vector. Giving the columns with date informations |
format |
character string. Specify the format of the date |
header |
logical. Does the data have a header? |
tz |
character string. Time zone of the data |
skip |
integer: the number of lines of the data file to skip before beginning to read data. |
cut.prefix |
integer. Amount of leading characters that will be ignored in formatting the POSIXct object. Experimental! |
... |
additional arguments from other methods passed to |
Other than in older versions, where the standard arguments of this function were designed to read COSERO input and output files, this function by default reads tab-separated files using the time format Y-m-d H:M.
an xts object.
Simon Frey
write.xts
fpath <- system.file("extdata","qobs_qsim.txt", package = "TigR")
out <- read.xts(x = fpath)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.