Learn R Programming

dataset (version 0.1.9)

resource_type: Get/set the resource type of the dataset

Description

Get/set Type property to the dataset.

Usage

resource_type(x)

resource_type(x) <- value

Value

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

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.)

Examples

Run this code
x <- data.frame()
resource_type(x) <- "Dataset"
resource_type(x)

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

Run the code above in your browser using DataLab