| contributor | R Documentation |
contributor() is a lightweight wrapper around creator() that
works only with contributors. It retrieves or updates only the contributor
entries in the dataset's bibliographic metadata.
contributor(x)
contributor(x, overwrite = FALSE) <- value
x |
A dataset object created with |
overwrite |
Logical. If |
value |
A |
All people are stored in the author slot of the underlying
utils::bibentry. This helper preserves primary creators and filters or
updates only those entries that represent contributors.
A contributor is defined as:
a person with role == "ctb", or
a person with a comment[["contributorType"]].
Primary creators (authors) typically have role %in% c("aut", "cre").
Contributors can be further annotated with metadata in comment, for
example:
comment = c(contributorType = "hostingInstitution", ORCID = "0000-0000-0000-0000")
contributor() returns a utils::person or a list of such objects
corresponding to contributors.
contributor<-() returns the updated dataset (invisibly).
Other bibliographic helper functions:
creator(),
dataset_format(),
dataset_title(),
description(),
geolocation(),
get_bibentry(),
language,
publication_year(),
publisher(),
relation(),
rights(),
subject()
df <- dataset_df(data.frame(x = 1))
creator(df) <- person("Jane", "Doe", role = "aut")
# Add a contributor
contributor(df, overwrite = FALSE) <-
person("GitHub",
role = "ctb",
comment = c(contributorType = "hostingInstitution")
)
# Replace all contributors
contributor(df) <- person("Support", "Team", role = "ctb")
# Inspect only contributors
contributor(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.