readSDML | R Documentation |
Read a StatDataML file and create a corresponding R object.
readSDML(file="", text=NULL, validate=FALSE, read.description=FALSE, ...)
file |
the StatDataML file to be read. |
text |
a string containing StatDataML code (if no file is specified). |
validate |
logical, should |
read.description |
logical, should the |
... |
arguments passed to |
For details on the StatDataML
format see the proposal.
a data object with an additional SDMLdescription
attribute
David.Meyer@R-Project.org
see also writeSDML
library(XML) TEST <- function(x) identical(readSDML(text = capture.output(writeSDML(x))), x) # write/read vector with names a <- 1:15 names(a) <- paste("n", 1:15, sep="") stopifnot(TEST(a)) # write/read a matrix A <- matrix(1:16, ncol=4) rownames(A) <- paste("row", 1:4, sep="") colnames(A) <- paste("col", 1:4, sep="") stopifnot(TEST(A)) # write/read a data.frame data(iris) stopifnot(TEST(iris)) # write/read a ts object data(airmiles) stopifnot(TEST(airmiles)) # write/read the islands data data(islands) stopifnot(TEST(islands))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.