as_lp_tibble {delma}R Documentation

Convert metadata to a lightparser tibble

Description

Takes objects of class tbl_df, list or xml_document and converts them to a tibble with a structure required by lightparser. Note that delma represents these as an object of class tbl_lp for convenience.

Usage

as_lp_tibble(x, ...)

## S3 method for class 'tbl_lp'
as_lp_tibble(x, ...)

## S3 method for class 'tbl_df'
as_lp_tibble(x, ...)

## S3 method for class 'list'
as_lp_tibble(x, ...)

## S3 method for class 'xml_document'
as_lp_tibble(x, ...)

Arguments

x

Object to be converted.

...

Other arguments, currently ignored.

Value

An object of class tbl_lp, tbl_df, tbl and data.frame, containing the following fields:

Examples

source_file <- system.file("extdata", 
                           "bionet_metadata.xml",
                           package = "delma")
xml_data <- xml2::read_xml(source_file)
as_lp_tibble(xml_data)

[Package delma version 0.1.1 Index]