dataset_df | R Documentation |
The dataset_df
constructor creates the objects of this
class, which are semantically rich, modern data frames inherited from
tibble::tibble
.
dataset_df(
...,
identifier = c(eg = "http://example.com/dataset#"),
var_labels = NULL,
units = NULL,
concepts = NULL,
dataset_bibentry = NULL,
dataset_subject = NULL
)
as_dataset_df(
df,
identifier = c(eg = "http://example.com/dataset#"),
var_labels = NULL,
units = NULL,
concepts = NULL,
dataset_bibentry = NULL,
dataset_subject = NULL,
...
)
is.dataset_df(x)
## S3 method for class 'dataset_df'
print(x, ...)
is_dataset_df(x)
... |
The vectors (variables) that should be included in the dataset. |
identifier |
Defaults to |
var_labels |
The long, human readable labels of each variable. |
units |
The units of measurement for the measured variables. |
concepts |
The linked concepts of the variables, attributes, or constants. |
dataset_bibentry |
A list of bibliographic references and descriptive
metadata about the dataset as a whole created with |
dataset_subject |
The subject of the dataset, see |
df |
A |
x |
A |
To check if an object has the class dataset_df use
is.dataset_df
.
print
is the method to print out the
semantically rich data frames created with the constructor of
dataset_df
.
summary
is the method to summarise these
semantically rich data frames.
For more details, please check the vignette("dataset_df",
package = "dataset")
vignette.
dataset_df
is the constructor of this type, it returns an
object inherited from a data frame with semantically rich metadata.
is.dataset_df
returns a logical value
(if the object is of class dataset_df
.)
my_dataset <- dataset_df(
country_name = defined(
c("AD", "LI"),
concept = "http://data.europa.eu/bna/c_6c2bb82d",
namespace = "https://www.geonames.org/countries/$1/"
),
gdp = defined(
c(3897, 7365),
label = "Gross Domestic Product",
unit = "million dollars",
concept = "http://data.europa.eu/83i/aa/GDP"
),
dataset_bibentry = dublincore(
title = "GDP of Andorra And Lichtenstein",
description = "A small but semantically rich datset example.",
creator = person("Jane", "Doe", role = "cre"),
publisher = "Open Data Institute",
language = "en")
)
# Use standard methods, like print, summary, head, tail
print(my_dataset)
head(my_dataset)
tail(my_dataset)
# Check class:
is.dataset_df(my_dataset)
# To check the bibliographic metadata of a dataset,
# use as_dublincore for DCTERMS:
as_dublincore(my_dataset)
# ... and as_datacite for DataCite:
as_datacite(my_dataset)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.