inst/doc/opts.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(sinew)

## -----------------------------------------------------------------------------
sinew_opts$get()

## -----------------------------------------------------------------------------
sinew_opts$get('author')

## -----------------------------------------------------------------------------
sinew_opts$get(c('author','source'))

## -----------------------------------------------------------------------------
sinew_opts$set(list(author='John Doe'))
sinew_opts$get('author')

## -----------------------------------------------------------------------------
sinew_opts$get('add_fields')

## -----------------------------------------------------------------------------
sinew_opts$append(add_fields='source')
sinew_opts$get('add_fields')

## -----------------------------------------------------------------------------
sinew_opts$restore()
sinew_opts$get(c('add_fields','author'))

Try the sinew package in your browser

Any scripts or data that you put into this service are public.

sinew documentation built on March 31, 2022, 5:06 p.m.