docu_odf | R Documentation |
Get access to information about the dataset and variables via the R-Studio Viewer or the web browser.
docu_odf(
input,
languages = "current",
style = "viewer",
replace_missing_language = FALSE,
variables = "yes"
)
input |
R data frame (df) or variable from an R data frame (df$var). |
languages |
Select the language in which the descriptions and labels of the data will be displayed.
|
style |
Selects where the output should be displayed (console ore
viewer).By default the metadata information is displayed in the viewer if the
viewer is available.
(
|
replace_missing_language |
If only one language is specified in languages and replace_missing_language is set to TRUE. In case of a missing label or description, the default or english label/description is displayed additionally (if one of these is available). |
variables |
Indicate whether a list with all the variables should be
displayed with the dataset metadata.
If the input is a variable/column, the variables-argument will be ignored.
Set ( |
Documentation.
# get example data from the opendataformat package
df <- get(data("data_odf"))
# view documentation about the dataset in the language that is currently set
docu_odf(df)
# view information from a selected variable in language "en"
docu_odf(df$bap87, languages = "en")
# view dataset information for all available languages
docu_odf(df, languages = "all")
# print information to the R console
docu_odf(df$bap87, style = "print")
# print information to the R viewer
docu_odf(df$bap87, style = "viewer")
# Since the label for language de is missing, in this case the
# english label will be displayed additionally.
attributes(df$bap87)["label_de"] <- ""
docu_odf(df$bap87, languages = "de", replace_missing_language = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.