Learn R Programming

dataset (version 0.3.1)

xsd_convert: Convert to XML Schema Definition (XSD) types

Description

Convert the numeric, boolean and Date/time columns of a dataset xs:decimal, xsLboolean, xs:date and xs:dateTime.

Usage

xsd_convert(x, idcol, ...)

# S3 method for data.frame xsd_convert(x, idcol = NULL, ...)

# S3 method for dataset xsd_convert(x, idcol = NULL, ...)

# S3 method for tibble xsd_convert(x, idcol = NULL, ...)

# S3 method for character xsd_convert(x, idcol = NULL, ...)

# S3 method for numeric xsd_convert(x, idcol = NULL, ...)

# S3 method for integer xsd_convert(x, idcol = NULL, ...)

# S3 method for boolean xsd_convert(x, idcol = NULL, ...)

# S3 method for factor xsd_convert(x, idcol = NULL, ...)

# S3 method for POSIXct xsd_convert(x, idcol = NULL, ...)

# S3 method for Date xsd_convert(x, idcol = NULL, ...)

Arguments

x

An R object that contains the data of the dataset (a data.frame or inherited from data.frame), for example, tibble::tibble(), tsibble::tsibble(), data.table::data.table().

idcol

The name or position of the column that contains the row (observation) identifiers. If NULL, it will make a new idcol from row.names().

...

Further optional parameters for generic method.

See Also

dataset()

Examples

Run this code

# Convert data.frame to XML Schema Definition
xsd_convert(head(iris))

# Convert dataset to XML Schema Definition
xsd_convert(head(iris_dataset))

Run the code above in your browser using DataLab