Learn R Programming

replyr (version 0.3.01)

makeTempNameGenerator: Produce a temp name generator with a given prefix.

Description

Returns a function f where f() or f(dumpList=FALSE) return a new temporary name f(TRUE) or f(dumpList=TRUE) returns the list of names generated and clears the list.

Usage

makeTempNameGenerator(prefix, suffix = NULL)

Arguments

prefix

character, string to prefix temp names with.

suffix

character, optional additional disambiguating breaking string.

Value

name generator function.

Examples

Run this code

f <- makeTempNameGenerator('EX')
print(f())
print(f())
print(f(dumpList=TRUE))
print(f(dumpList=TRUE))

Run the code above in your browser using DataLab