stw_to_roxygen: Output to roxygen format

Description Usage Arguments Value Examples

View source: R/stw_to_roxygen.R

Description

Use these functions to convert your metadata to roxygen format. The function stw_to_roxygen() returns a roxygen string, stw_use_roxygen() copies a roxygen string to your clipboard, and str_write_roxygen() writes a roxygen string to a file.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
stw_to_roxygen(...)

## Default S3 method:
stw_to_roxygen(...)

## S3 method for class 'stw_meta'
stw_to_roxygen(meta, ...)

## S3 method for class 'stw_dataset'
stw_to_roxygen(dataset, ...)

stw_use_roxygen(meta)

stw_write_roxygen(meta, file)

Arguments

...

additional arguments (not used)

meta

Object with S3 class stw_meta, contains meta-data

dataset

Object with S3 class stw_dataset, a data frame with attached meta-data

file

character path of file to write

Value

stw_to_roxygen()

character, roxygen string

stw_use_roxygen()

invisible(meta), called for side-effects

stw_write_roxygen()

invisible(meta), called for side-effects

Examples

1
2
3
4
5
6
7
cat(stw_to_roxygen(diamonds_meta))
stw_write_roxygen(diamonds_meta, tempfile(fileext = ".yml"))
## Not run: 
# not run because it copies text to the clipboard
stw_use_roxygen(diamonds_meta)

## End(Not run)

ijlyttle/steward documentation built on Jan. 5, 2021, 2:25 p.m.