draft.software: Draft SOFTWARE.bib

Description Usage Arguments Details Value Note See Also Examples

View source: R/draft.software.R

Description

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

Usage

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

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.

Value

Object of class Bibtex.

Note

After creating the initial draft, the user can complete the version, source, and other fields as required.

This function is especially useful for citing exact versions of R packages on GitHub. To prepare metadata for software other than R packages, see the TAF Wiki for an example.

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.

TAF-package gives an overview of the package.

Examples

1
2
3
4
5
6
7
8
9
# Print in console
draft.software("TAF")


## Not run: 
# Export to file
draft.software("TAF", file=TRUE)

## End(Not run)

TAF documentation built on April 7, 2021, 5:06 p.m.