Learn R Programming

dataset (version 0.3.4)

get_bibentry: Get/set the Bibentry of the object.

Description

The dataset_df objects contain among their attributes bibliographic entries which are stored in a utils::bibentry object. Upon creation, these entries are filled with default values when applicable.

To retrieve the bibentry of a dataset_df object, use get_bibentry.

To create a new bibentry, use the datacite function for an interface and default values according to the DataCite standard, or the dublincore function for the more general Dublin Core standard.

To change or an entire new bibliographic entry to a dataset_df object (or any data.frame-like object), use the `set_bibentry<-` function (see examples.) For more details, please check the vignette("bibentry", package="dataset") vignette.

Usage

get_bibentry(dataset)

set_bibentry(dataset) <- value

Value

The get_bibentry returns from the bibentry

object of x from its attributes; the `set_bibentry<-` assignment function sets this attribute to value and invisibly returns x

with the changed attributes. To set well-formatted input value, refer to datacite or dublincore (see Details.)

Arguments

dataset

A dataset created with dataset_df.

value

A utils::bibentry object, or a newly initialised bibentry object with DataCite default values for unassigned entries.

See Also

Other bibentry functions: datacite(), dublincore()

Examples

Run this code
# Get the bibentry of a dataset_df object:
iris_bibentry <- get_bibentry(iris_dataset)

# Create a well-formatted bibentry object:
alternative_bibentry <- datacite(
     Creator=person("Jane Doe"),
     Title ="The Famous Iris Dataset",
     Publisher = "MyOrg")

# Assign the new bibentry object:
set_bibentry(iris_dataset) <- alternative_bibentry

# Print the bibentry object according to the DataCite notation:
as_datacite(iris_dataset, "list")

# Print the bibentry object according to the Dublin Core notation:
as_dublincore(iris_dataset, "list")

Run the code above in your browser using DataLab