Learn R Programming

icesTAF (version 3.6.0)

draft.data: Draft DATA.bib

Description

Create an initial draft version of a DATA.bib metadata file.

Usage

draft.data(originator = NULL, year = format(Sys.time(), "%Y"),
  title = NULL, period = NULL, access = "Public", source = NULL,
  file = "", append = FALSE, data.files = dir("bootstrap/initial/data"),
  data.scripts = dir("bootstrap", pattern = "\\.R$"))

Value

Object of class Bibtex.

Arguments

originator

who prepared the data, e.g. a working group acronym.

year

year of the analysis when the data were used. The default is the current year.

title

description of the data, including survey names or the like.

period

a string of the form "1990-2000", indicating the first and last year that the data cover, separated by a simple dash. Alternatively, a single number if the data cover only one year. If the data do not cover specific years, this metadata field can be suppressed using period = FALSE.

access

data access code: "OSPAR", "Public", or "Restricted".

source

where the data are copied/downloaded from. This can be a URL, filename, special value "file", or special value "script".

file

optional filename to save the draft metadata to a file. The value TRUE can be used as shorthand for "bootstrap/DATA.bib".

append

whether to append metadata entries to an existing file.

data.files

data files to consider. The default is all folders and files inside bootstrap/initial/data.

data.scripts

bootstrap data scripts to consider. The default is all *.R files in the bootstrap folder.

Details

Typical usage is to specify originator, while using the default values for the other arguments. Most data files have the same originator, which can be specified to facilitate completing the entries after creating the initial draft.

The data access codes come from https://vocab.ices.dk/?ref=1435.

The special values source = "file" and source = "script" are described on the TAF Wiki, along with other metadata information.

The default value file = "" prints the initial draft in the console, instead of writing it to a file. The output can then be pasted into a file to edit further, without accidentally overwriting an existing metadata file.

See Also

period pastes two years to form a period string.

draft.software creates an initial draft version of a SOFTWARE.bib metadata file.

taf.bootstrap reads and processes metadata entries.

icesTAF-package gives an overview of the package.

Examples

Run this code
if (FALSE) {
# Print in console
draft.data("WGEF", 2015)

# Export to file
draft.data("WGEF", 2015, file=TRUE)
}

Run the code above in your browser using DataLab