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.
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.
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.)
See also
Other bibentry functions:
as_dublincore()
,
datacite()
Examples
# 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")
#> $Title
#> [1] "The Famous Iris Dataset"
#>
#> $Creator
#> [1] "Jane Doe"
#>
#> $Identifier
#> [1] ":tba"
#>
#> $Publisher
#> [1] "MyOrg"
#>
#> $PublicationYear
#> [1] ":tba"
#>
#> $Subject
#> $Subject[[1]]
#> [1] "Irises (plants)"
#>
#>
#> $Type
#> [1] "Dataset"
#>
#> $Contributor
#> [1] ""
#>
#> $Date
#> [1] ":tba"
#>
#> $DateList
#> [1] ":tba"
#>
#> $Language
#> [1] ":unas"
#>
#> $AlternateIdentifier
#> [1] ":unas"
#>
#> $RelatedIdentifier
#> [1] ":unas"
#>
#> $Format
#> [1] ":tba"
#>
#> $Version
#> [1] "0.1.0"
#>
#> $Rights
#> [1] ":tba"
#>
#> $Description
#> [1] ":tba"
#>
#> $Geolocation
#> [1] ":unas"
#>
#> $FundingReference
#> [1] ":unas"
#>
# Print the bibentry object according to the Dublin Core notation:
as_dublincore(iris_dataset, "list")
#> $title
#> [1] "The Famous Iris Dataset"
#>
#> $creator
#> [1] "Jane Doe"
#>
#> $identifier
#> [1] ":tba"
#>
#> $publisher
#> [1] "MyOrg"
#>
#> $subject
#> [1] "data sets"
#>
#> $type
#> [1] "DCMITYPE:Dataset"
#>
#> $contributor
#> NULL
#>
#> $date
#> [1] ":tba"
#>
#> $language
#> [1] ":unas"
#>
#> $relation
#> [1] ":unas"
#>
#> $format
#> [1] ":tba"
#>
#> $rights
#> [1] ":tba"
#>
#> $datasource
#> [1] ":unas"
#>
#> $description
#> [1] ":tba"
#>
#> $coverage
#> [1] ":unas"
#>