Description Usage Arguments Examples
Read/Write mudata objects
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | write.mudata(md, filename, ...)
read.mudata(filename, ...)
write.mudata.zip(md, filename, overwrite = FALSE, expand.tags = TRUE,
validate = TRUE, ...)
read.mudata.zip(filename, validate = TRUE, expand.tags = TRUE,
retype = TRUE, load = c("data", "locations", "params", "datasets",
"columns"), ...)
write.mudata.json(md, filename, overwrite = FALSE, expand.tags = TRUE,
validate = TRUE, ...)
read.mudata.json(filename, validate = TRUE, expand.tags = TRUE,
retype = TRUE, load = c("data", "locations", "params", "datasets",
"columns"), ...)
|
md |
a mudata object |
filename |
file to read/write (can also be a directory) |
... |
passed to read/write.csv |
overwrite |
Pass |
expand.tags |
flag to expand tags to columns |
validate |
flag to validate mudata object upon read or before write |
retype |
Pass |
load |
a list of csv files (without the .csv extension) to load from the source. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(kentvillegreenwood)
# read/write to zip
outfile <- tempfile(fileext=".zip")
write.mudata(kentvillegreenwood, outfile)
md <- read.mudata(outfile)
md <- read.mudata(outfile, retype=TRUE)
plot(subset(md, params=c("meantemp", "maxtemp")))
unlink(outfile)
# read/write to JSON
outfile <- tempfile(fileext=".json")
write.mudata(kentvillegreenwood, outfile)
md <- read.mudata(outfile)
md <- read.mudata(outfile, retype=TRUE)
plot(subset(md, params=c("meantemp", "maxtemp")))
unlink(outfile)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.