with_makevars {withr}R Documentation

Makevars variables

Description

Temporarily change contents of an existing Makevars file.

Usage

with_makevars(new, code, path = file.path("~", ".R", "Makevars"),
  assignment = c("=", ":=", "?=", "+="))

Arguments

new

[named character]
New variables and their values

code

[any]
Code to execute in the temporary environment

path

[character(1)]
location of existing Makevars file to modify.

assignment

[character(1)]
assignment type to use.

Details

If no Makevars file exists or the fields in new do not exist in the existing Makevars file then the fields are added to the new file. Existing fields which are not included in new are appended unchanged. Fields which exist in Makevars and in new are modified to use the value in new.

Value

[any]
The results of the evaluation of the code argument.

See Also

withr for examples


[Package withr version 2.1.2 Index]