Render a define.pdf document conforming to FDA standards

render_fda_define(x, ...)

# S3 method for yproj
render_fda_define(
  x,
  stem = "define",
  title = "Data Definitions",
  date = as.character(Sys.Date()),
  author = "",
  format = "fda_define",
  output_dir = getwd(),
  build_dir = definetemplate(),
  ext = ".xpt",
  loc = ".",
  sponsor = NULL,
  projectnumber = NULL,
  ...
)

# S3 method for character
render_fda_define(x, ..., dots = list())

# S3 method for yspec
render_fda_define(x, ..., dots = list())

Arguments

x

a yaml specification file name or a yproj object

...

passed to rmarkdown::render()

stem

used to name the output document

title

a title for the document

date

the document date

author

the document author

format

function to generate the define text

output_dir

The output directory for the rendered output_file. This allows for a choice of an alternate directory to which the output file should be written (the default output directory of that of the input file). If a path is provided with a filename in output_file the directory specified here will take precedence. Please note that any directory path provided will create any necessary directories if they do not exist.

build_dir

directory where the document is to be built

ext

data set file extension to include; this should only be changed from default value of ".xpt" for testing purposes

loc

location to use for data set files; this should only be changed from default value of "." for testing purposes

sponsor

optional project sponsor

projectnumber

optional project number in ...

dots

named list of arguments passed to object converter function

latex requirements

For all document types, the following latex packages are required:

  1. array

  2. longtable

  3. booktabs

  4. fontenc

  5. mathdesign

Make sure these packages are installed and available when trying to render a document.

Examples

proj_file <- file_proj_ex()

proj_file
#> [1] "/private/var/folders/zv/v6tkdhrn1_bb1ndrc0c0j31w0000gp/T/Rtmp7lFAoU/temp_libpath5f2935e7abd0/yspec/spec/project.yml"

if (FALSE) {
  render_fda_define(proj_file)
}