Skip to contents

[Experimental] This function allows to deposit a record to Zenodo repository. The function use the functions implemented by zen4r package. Blondel, Emmanuel, & Barde, Julien. (2021). zen4R: R Interface to Zenodo REST API (0.5-2). Zenodo. https://doi.org/10.5281/zenodo.5741143.

Usage

produce_zenodo_record(
  mytoken,
  myfiles,
  delim,
  upload_rdata = FALSE,
  record_type = "dataset",
  record_title,
  record_description,
  record_authors,
  record_license = "CC-BY-SA-4.0",
  record_accessRight = "open",
  record_version = "1.0",
  record_language = "eng",
  record_keywords,
  record_relatedIdentifier,
  record_communities = c("lter-italy", "elter"),
  record_grants,
  record_publish = FALSE
)

Arguments

mytoken

A character. Scopes assign permissions to your personal access token. A personal access token works just like a normal OAuth access token for authentication against the API. This token can be created at application page.

myfiles

A character. The list of the file(s) to deposit in Zenodo.

delim

A character. Provide the character used to separate fields within a record. Only if you want to upload to Zenodo a dataset (see param record_type below) with extension 'csv', 'tsv' or 'txt' and if you want to upload also a copy of your dataset in Rdata format (see param upload_rdata below).

upload_rdata

A logical. Do you want also upload a version of the dataset in RData format onto this record? Default FALSE.

record_type

A character. A type of record among the following values: 'publication', 'poster', 'presentation', 'dataset', 'image', 'video', 'software', 'lesson', 'physicalobject', 'other'. Default 'dataset'.

record_title

A character. The title of the record.

record_description

A character. The description of the record.

record_authors

A tibble. It is a list of creator(s) of the record. The approach is to use the firstname, lastname, affiliation, orcid of the authors of the record. Please follow the example.

record_license

A character. It is the license with which the record is released. The license should be set with the Zenodo id of the license. Default "CC-BY-SA-4.0". The supported licenses values are from https://opendefinition.org and https://spdx.org.

record_accessRight

A character. Default "open". Other options are: 'embargoed', 'restricted' and 'closed'.

record_version

A character. It is a version of the record. Default "1.0".

record_language

A character. It is the language of the record. Only one value is possible. Default "eng".

record_keywords

A character. A multiple values are possible. The keyword to the record of record.

record_relatedIdentifier

A tibble. It is the related entities (e.g. scientific paper, data paper, etc.) with the detaset. The tibble is composed by 2 variables: relation and identifier. Relation can be one of among following values: "isCitedBy", "cites", "isSupplementTo", "isSupplementedBy", "isNewVersionOf", "isPreviousVersionOf", "isPartOf", "hasPart", "compiles", "isCompiledBy", "isIdenticalTo", "isAlternateIdentifier". While identifier is any type of identifier (e.g. DOI).

record_communities

A character. It is a name of communities as created in Zenodo. A multiple values are possible. Default "lter-italy" and "elter".

record_grants

A character. A multiple values are possible. Put a list of project identifier as well as showed by the European Commission via OpenAIRE.

record_publish

A logical. State whether the Zenodo record is to be published. The parameter publish can be set to TRUE (to use CAUTIOUSLY, only if you want to publish your record). Default FALSE.

Value

A link (URL) of the deposited record in Zenodo. The user must then:

  1. visit the webpage of record, 2. check the information provided, 3. 'save' and 'publish' the record on Zenodo repository, 4. use the DOI to cite the record.

See also

Author

Alessandro Oggioni, phD oggioni.a@irea.cnr.it

Examples

if (FALSE) {
## Not run:

authors <- tibble::tibble(
  name = c("Luke", "Leia"),
  surname = c("Skywalker", "Organa"),
  affiliation = c("Tatooine", "Alderaan"),
  orcid = c("0000-0002-7997-219X", "0000-0002-7997-219X")
)
keywords <- c("Star Wars", "species", "films", "planets")
relatedIdentifiers <- tibble::tibble(
  relation = c("isSupplementTo", "isPartOf"),
  identifier = c("10.1038/s4150-01-0032", "10.1016/j.2051.06.026")
)
grants <- c("871128", "654359", "871126")
produce_zenodo_record(
  mytoken = mytoken, # generate your Zenodo token
  myfiles = myfile, # provide your file(s)
  delim = ";",
  upload_rdata = TRUE,
  record_title = "The title",
  record_description = "This is the description of the record.",
  record_authors = authors,
  record_keywords = keywords,
  record_relatedIdentifier = relatedIdentifiers,
  record_communities = "lter-italy",
  record_grants = grants,
  record_publish = FALSE
)
}

## End (Not run)