draft.software {TAF} | R Documentation |
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)
Arguments
package |
name of one or more R packages, or files/folders starting with
the path |
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
|
file |
optional filename to save the draft metadata to a file. The value
|
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.boot
reads and processes metadata entries.
TAF-package
gives an overview of the package.
Examples
# Print in console
draft.software("TAF")
## Not run:
# Export to file
draft.software("TAF", file=TRUE)
## End(Not run)