Skip to contents

Read data package report

Usage

read_data_package_report(packageId, as = "xml", env = "production")

Arguments

packageId

(character) Data package identifier

as

(character) Format of the returned report. Can be: "xml", "html", or "char".

env

(character) Repository environment. Can be: "production", "staging", or "development".

Value

(xml_document) Data package report

Examples

if (FALSE) { # \dontrun{

# Read as XML
qualityReport <- read_data_package_report("knb-lter-knz.260.4")
qualityReport
#> {xml_document}
#> <qualityReport schemaLocation="eml://ecoinformatics.org/qualityReport ...
#>  [1] <creationDate>2020-02-04T16:38:38</creationDate>
#>  [2] <packageId>knb-lter-knz.260.4</packageId>
#>  [3] <includeSystem>lter</includeSystem>
#>  [4] <includeSystem>knb</includeSystem>
#>  [5] <datasetReport>\n  <qualityCheck qualityType="metadata" system=" ...
#>  [6] <entityReport>\n  <entityName>GIS600</entityName>\n  <qualityChe ...
#>  [7] <entityReport>\n  <entityName>KMZGIS600</entityName>\n  <quality ...
#>  [8] <entityReport>\n  <entityName>GIS605</entityName>\n  <qualityChe ...
#>  [9] <entityReport>\n  <entityName>KMZGIS605</entityName>\n  <quality ...
#> [10] <entityReport>\n  <entityName>GIS610</entityName>\n  <qualityChe ...
#> ...

# Read as HTML
qualityReport <- read_data_package_report(
 packageId = "knb-lter-knz.260.4",
 as = "html"
)
qualityReport
#> {html_document}
#> <html>
#> [1] <body><table xmlns:qr="eml://ecoinformatics.org/qualityReport"><t ...

# Read as character
qualityReport <- read_data_package_report(
 packageId = "knb-lter-knz.260.4",
 as = "char"
)
# writeLines(qualityReport, paste0(tempdir(), "/report.txt"))
} # }