Skip to contents

Dataset

Work with DataSet objects that resemble the W3C and SDMX datacube model.

dataset_df() as_dataset_df() is.dataset_df() print(<dataset_df>) is_dataset_df()
Create a new dataset_df object
bind_defined_rows()
Bind strictly defined rows

Defined

A labelled subclass that retains unit, definition and namespace.

defined() is.defined() summary(<haven_labelled_defined>)
Create a semantically well-defined, labelled vector
var_label(<defined>) label_attribute() `var_label<-`() var_label(<dataset_df>)
Get or Set a Variable Label
var_labels() `var_labels<-`()
Get or set all variable labels on a dataset
var_unit() `var_unit<-`() get_variable_units() unit_attribute() get_unit_attribute() set_unit_attribute() `unit_attribute<-`()
Get or Set a Unit of Measure
var_concept() `var_concept<-`()
Get / set a concept definition for a vector or a dataset
var_namespace() `var_namespace<-`() get_variable_namespaces() namespace_attribute() get_namespace_attribute() set_namespace_attribute() `namespace_attribute<-`()
Get or Set the Namespace of a Variable
as_numeric() as.numeric(<haven_labelled_defined>)
Coerce a defined vector to numeric
as_character() as.character(<haven_labelled_defined>)
Coerce a defined vector to character
as_factor()
Coerce a defined vector to a factor
strip_defined()
Strip the class from a defined vector
get_variable_concepts()
Get concepts for all variables in a dataset_df
c(<haven_labelled_defined>)
Combine defined vectors with metadata checks
vec_cast.double(<haven_labelled_defined>)
Cast defined vector to base numeric (double)

Bibliography functions

Constructors for extended bibentry classes (DataCite / DCTERMS).

bibrecord()
Create a Modern Metadata Object Compatible with bibentry
as_datacite() datacite() is.datacite() print(<datacite>)
Create a Bibentry Object with DataCite Metadata Fields
as_dublincore() dublincore() is.dublincore() print(<dublincore>)
Add or Retrieve Dublin Core Metadata

Bibliography helpers

Helpers to read/update bibliography attributes of dataset_df.

get_bibentry() `set_bibentry<-`()
Get or set the bibentry
dataset_title() `dataset_title<-`()
Get or Set the Title of a Dataset
creator() `creator<-`()
Get/set the Creator of the object.
contributor() `contributor<-`()
Get or set contributors
language() `language<-`()
Set the Primary Language of a Dataset
subject() subject_create() `subject<-`() is.subject()
Create, add, or retrieve a subject
relation() `relation<-`() related_create() is.related() related_item() `related_item<-`()
Add or retrieve related items (DataCite/Dublin Core)
publication_year() `publication_year<-`()
Get or Set the Publication Year of a Dataset Object
publisher() `publisher<-`()
Get or Set the Publisher of a Dataset Object
dataset_format() `dataset_format<-`()
Get or set the technical format of a dataset
rights() `rights<-`()
Get or Set the Rights of a Dataset Object
identifier() `identifier<-`()
Get or Set the Identifier of a Dataset or Metadata Record
description() `description<-`()
Get or set the dataset Description
geolocation() `geolocation<-`()
Get or Set the Geolocation of a Dataset Object

RDF Serialisation

Describe data/metadata in RDF.

describe()
Describe a dataset in N-Triples format
provenance() `provenance<-`()
Get or update provenance information
xsd_convert()
Convert to XML Schema Definition (XSD) Types
n_triples()
Create N-Triples
n_triple()
Create an N-Triple
dataset_to_triples()
Dataset to triples (three columns or N-Triples)
id_to_column()
Add Identifier to First Column of a Dataset

Replication Datasets

Enriched Orange and simple GDP demo datasets.

orange_df
Growth of Orange Trees
gdp
A Small GDP Dataset