Create an initial draft version of a DATA.bib
metadata file.
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$"))
who prepared the data, e.g. a working group acronym.
year of the analysis when the data were used. The default is the current year.
description of the data, including survey names or the like.
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
.
data access code: "OSPAR"
, "Public"
, or
"Restricted"
.
where the data are copied/downloaded from. This can be a URL,
filename, special value "file"
, or special value
"script"
.
optional filename to save the draft metadata to a file. The value
TRUE
can be used as shorthand for "bootstrap/DATA.bib"
.
whether to append metadata entries to an existing file.
data files to consider. The default is all folders and
files inside bootstrap/initial/data
.
bootstrap data scripts to consider. The default is all
*.R
files in the bootstrap
folder.
Object of class Bibtex
.
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.
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.
# NOT RUN {
# Print in console
draft.data("WGEF", 2015)
# Export to file
draft.data("WGEF", 2015, file=TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab