subject | R Documentation |
Add one or more subject terms to the dataset's metadata.
subject(x)
subject(x, overwrite = FALSE) <- value
subject_create(
term,
subjectScheme = NA_character_,
schemeURI = NA_character_,
valueURI = NA_character_
)
x |
An R object |
overwrite |
Defaults to |
value |
Subject terms, or a Subject object created by |
term |
A term, or a character vector of multiple terms. |
subjectScheme |
The scheme to which the term corresponds. If there are multiple terms, provide the subjectScheme(s) in the same order. Optional. |
schemeURI |
The URI(s) of the subject identifier scheme. If there are multiple terms, provide the schemeURIs in the same order as the terms. Optional. |
valueURI |
The URI of the subject term. If there are multiple terms, provide the valueURIs in the same order as the terms. Optional. |
In the Dublin Core elements, dct::subject is
defined Typically, the subject will be represented using keywords, key phrases, or classification codes. It is
recommended as a best practice to use a controlled vocabulary.
In DataCite, subjects are defined as key phrases from a controlled library.
The subjects as a data.frame of terms
x <- data.frame( geo = c("AL", "MK"),
value = c(1,2))
my_subject <- subject_create (
term = c("R (Computer program language)",
"Questionnaires--Computer programs"),
subjectScheme = rep("LC Subject Headings", 2),
schemeURI = rep("http://id.loc.gov/authorities/subjects",2),
valueURI = c("https://id.loc.gov/authorities/subjects/sh2002004407.html",
"http://id.worldcat.org/fast/1085693/")
)
subject(x) <- my_subject
subject(x)
y <- data.frame()
subject(y) <- "R (Computer program language)"
subject(y) <- "Questionnaires--Computer programs"
subject(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.