readSDML {StatDataML} | R Documentation |
Read StatDataML Files
Description
Read a StatDataML file and create a corresponding R object.
Usage
readSDML(file="", text=NULL, validate=FALSE, read.description=FALSE, ...)
Arguments
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 |
Details
For details on the StatDataML
format see the proposal.
Value
a data object with an additional SDMLdescription
attribute
Author(s)
David.Meyer@R-Project.org
See Also
see also writeSDML
Examples
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))
[Package StatDataML version 1.0-27 Index]