Learn R Programming

icesTAF (version 3.6.0)

draft.software: Draft SOFTWARE.bib

Description

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

Usage

draft.software(package, author = NULL, year = NULL, title = NULL,
  version = NULL, source = NULL, file = "", append = FALSE)

Value

Object of class Bibtex.

Arguments

package

name of one or more R packages, or files/folders starting with the path bootstrap/initial/software.

author

author(s) of the software.

year

year when this version of the software was released, or the publication year of the cited manual/article/etc.

title

title or short description of the software.

version

string to specify details about the version, e.g. GitHub branch and commit date.

source

string to specify where the software are copied/downloaded from. This can be a GitHub reference of the form owner/repo[/subdir]@ref, URL, or a filename.

file

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

append

whether to append metadata entries to an existing file.

Details

Typical usage is to specify package, while using the default values for the other arguments.

If package is an R package, it can either be a package that is already installed ("icesAdvice") or a GitHub reference ("ices-tools-prod/icesAdvice@4271797").

With the default version = NULL, the function will automatically suggest an appropriate version entry for CRAN packages, but for GitHub packages it is left to the user to add further information about the GitHub branch (if different from master) and the commit date.

With the default source = NULL, the function will automatically suggest an appropriate source entry for CRAN and GitHub packages, but for other R packages it is left to the user to add information about where the software can be accessed.

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

citation and packageDescription are the underlying functions to access information about installed R packages.

draft.data creates an initial draft version of a DATA.bib metadata file.

taf.bootstrap reads and processes metadata entries.

icesTAF-package gives an overview of the package.

Examples

Run this code
# \donttest{
# Print in console
draft.software("icesTAF")
# }

if (FALSE) {
# Export to file
draft.software("icesTAF", file=TRUE)
}

Run the code above in your browser using DataLab