xsd_convert | R Documentation |
Convert the numeric, boolean and Date/time columns of a dataset
xs:decimal
, xsLboolean
, xs:date
and xs:dateTime
.
xsd_convert(x, idcol, ...)
## S3 method for class 'data.frame'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'dataset'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'tibble'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'character'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'numeric'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'haven_labelled_defined'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'integer'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'logical'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'factor'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'POSIXct'
xsd_convert(x, idcol = NULL, ...)
## S3 method for class 'Date'
xsd_convert(x, idcol = NULL, ...)
x |
An object to be coerced to an XLM Schema defined string format. |
idcol |
The name or position of the column that contains the row
(observation) identifiers. If |
... |
Further optional parameters for generic method. |
A serialisation of an R vector or data frame (dataset) in XML.
# Convert data.frame to XML Schema Definition
xsd_convert(head(iris))
# Convert dataset to XML Schema Definition
xsd_convert(head(iris_dataset))
# Convert integers or doubles, numbers:
xsd_convert(1:3)
# Convert logical values:
xsd_convert(TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.