moga: Make Oxygen Great Again

View source: R/moga.R

mogaR Documentation

Make Oxygen Great Again

Description

Update/append an R file that has roxygen2 headers already with updated information

Usage

moga(path, ..., force.fields = NULL, dry.run = TRUE, overwrite = FALSE)

Arguments

path

character path to R file

...

arguments to be passed to new makeOxygen

force.fields

character, vector a field names that are in current header that are to be updated Default: NULL

dry.run

boolean, write lines to console the output, Default: TRUE

overwrite

boolean, overwrite contents of input file, Default: FALSE

Details

Cross references fields already in the roxygen2 header and adds any new ones from the updated call. To force a change to a field add field name to force.fields.

Value

character

Examples


# We want to update the contents of the Roxygen2 with the new parameter "b"
# without touching the other fields

# Before
 cat(readLines(system.file('example_moga.R',package = 'sinew')),sep = '\n')

# After
 moga(system.file('example_moga.R',package = 'sinew'))
 

yonicd/sinew documentation built on March 1, 2024, 1:06 a.m.