resource_type: Get/set the resource type of the dataset

View source: R/resource_type.R

resource_typeR Documentation

Get/set the resource type of the dataset

Description

Get/set Type property to the dataset.

Usage

resource_type(x)

resource_type(x) <- value

Arguments

x

An R dataset object inherited from data.frame, tibble, or data.table.

value

The Type$resourceTypeGeneral is set to Dataset, while the user can set a more specific Type$resourceType value with the value argument. To initialize a Type parameter use resource_type(x) <- "Dataset".

Details

The DataCite resourceType definition refers back to dcm:type. The Type$resourceTypeGeneral is set to Dataset, while the user can set a more specific Type$resourceType value. (See examples.)

Value

Returns the x object with the Type attribute as a list. The Type$resourceTypeGeneral is set to Dataset.

Examples

x <- data.frame()
resource_type(x) <- "Dataset"
resource_type(x)

y <- data.frame()
resource_type(y) <- "Census Data"
resource_type(y)

dataset documentation built on March 31, 2023, 10:24 p.m.