file_creation: Add fct_ and utils_ files

Description Usage Arguments Value

Description

These functions add files in the R/ folder that starts either with fct_ (short for function) or with utils_.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
add_fct(
  name,
  module = NULL,
  pkg = get_golem_wd(),
  open = TRUE,
  dir_create = TRUE
)

add_utils(
  name,
  module = NULL,
  pkg = get_golem_wd(),
  open = TRUE,
  dir_create = TRUE
)

Arguments

name

The name of the file

module

If not NULL, the file will be module specific in the naming (you don't need to add the leading mod_).

pkg

Path to the root of the package. Default is get_golem_wd().

open

Should the created file be opened?

dir_create

Creates the directory if it doesn't exist, default is TRUE.

Value

The path to the file, invisibly.


golem documentation built on April 17, 2021, 9:06 a.m.