use_tabde: Use table design file

Description Usage Arguments

Description

use_tabde() is designed to be used during package development. It saves table_designs to the inst/table_design/ folder of the current package (and creates this folder if it doesnt exist).

use_tabde_fwf() and use_tabde_sql() are convenince functions that do the same and add the respective dummy columns.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
use_tabde(x, file = {     if (assert_namespace("rprojroot"))         
  rprojroot::find_package_root_file("inst", "table_design",
  paste0(deparse(substitute(x)), ".csv"))     else
  stop("argument 'file' is missing") }, overwrite = FALSE)

use_tabde_fwf(x, file = {     if (assert_namespace("rprojroot"))         
  rprojroot::find_package_root_file("inst", "table_design",
  paste0(deparse(substitute(x)), ".csv"))     else
  stop("argument 'file' is missing") }, overwrite = FALSE)

use_tabde_sql(x, file = {     if (assert_namespace("rprojroot"))         
  rprojroot::find_package_root_file("inst", "table_design",
  paste0(deparse(substitute(x)), ".csv"))     else
  stop("argument 'file' is missing") }, overwrite = FALSE)

Arguments

x

a table_design or a regular data.frame. Regular data.frames are converted to table_designs via get_tabde().

file

scalar character. name for the table_design .csv file. The default is to construct a filename from the name of the object passed to x.

overwrite

logical scalar. Set TRUE to overwrite existing files.


s-fleck/tabde documentation built on May 4, 2019, 1:23 p.m.