import_template: Import a script template

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/import_template.R

Description

Import a script template and transform it as an ScriptTemplate-class object.

Usage

1
2
import_template(builtin, path, language = "R", idiom = "en",
  encoding = "UTF-8")

Arguments

builtin

The name of a built-in template. See details for available built-in template. Override language and idiom parameters if given.

path

Path to the template file

language

The name of one language of the built-in template, could be en or fr. If a path or a built-in is provided, this argument is ignored.

idiom

The idiom of the built-in template, could be en or fr. If a path or a built-in is provided, this argument is ignored.

encoding

Encoding of the script template. Should be "ASCII", "latin-1" or "UTF-8" (default value)

Details

Actually, built-in templates are : \Sexpr{library(vartors);paste0(list_templates(), collapse = ", ")}

Value

Return a ScriptTemplate object.

Author(s)

Joris Muller

See Also

ScriptTemplate-class, script_template

Examples

1
2
3
4
5
# import the default built-in template
import_template()

# import a specific built-in template
import_template(builtin = "anothertemplate.R")

jomuller/vartors documentation built on May 19, 2019, 7:26 p.m.