Parse expressions residing in character vectors. Similar to parse() but keeping or not the source is controlled by an argument rather than global options.
parse_text(text, ..., keep = TRUE)
the text to parse, normally a character vector but can be
anything that parse
accepts for this artgument.
additional arguments to be passed on to parse
.
required setting for option keep.source
, see
details.
an expression representing the parsed text, see parse
for
details
This is like parse(text=text,…)
, except that whether or not
the source is kept is controlled by argument keep
, not by
options("keep.source")
.
parse_text
sets options("keep.source")
to keep
(if they are different) before calling parse
and restores it
afterwards.