Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

parse_text

Parse expressions residing in character vectors


Description

Parse expressions residing in character vectors.

Usage

parse_text(text, ..., keep = TRUE)

Arguments

text

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.

keep

required setting for option keep.source, see details.

Details

This is like parse(text=text,...) with the additional feature that if the setting of option "keep.source" is not as requested by argument keep, it is set to keep before calling parse and restored afterwards.

This function is no longer exported by Rdpack since it is here for historical reasons and to avoid unnecessary dependence on gbutils. Use the equivalent gbutils::parse_text instead.

Value

an expression representing the parsed text, see link{parse} for details

Note

The usual setting of option "keep.source" in interactive sessions is TRUE. However, in ‘R CMD check’ it is FALSE.

As a consequence, examples from the documentation may run fine when copied and pasted in an R session but (rightly) fail ‘R CMD check’, when they depend on option "keep.source" being TRUE.

Author(s)

Georgi N. Boshnakov

See Also

parse, parse_text in package gbutils


Rdpack

Update and Manipulate Rd Documentation Objects

v2.1.1
GPL (>= 2)
Authors
Georgi N. Boshnakov [aut, cre], Duncan Murdoch [ctb]
Initial release
2021-02-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.