make_copy: Duplicate an object in the global environment

View source: R/make_copy.R

make_copyR Documentation

Duplicate an object in the global environment

Description

Duplicate an oject in the global environment, so that one version can be modified without losing the previous version. Useful for testing modifications to objects generated by time-consuming code.

Usage

make_copy(var_name, append=".old", envir=.GlobalEnv)

Arguments

var_name

character string, the name of the object to be copied.

append

character string, the text to be appended to the object's name when making the copy. Defaults to ".old".

envir

the name of the environment in which to make the changes. Defaults to the global environment, .GlobalEnv.


mjdufort/miscHelpers documentation built on Feb. 4, 2024, 7:44 p.m.