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

parse_all

Parse, retaining comments.


Description

Works very similarly to parse, but also keeps original formatting and comments.

Usage

parse_all(x, filename = NULL, allow_error = FALSE)

Arguments

x

object to parse. Can be a string, a file connection, or a function. If a connection, will be opened and closed only if it was closed initially.

filename

string overriding the file name

allow_error

whether to allow syntax errors in x

Value

A data.frame with columns src, the source code, and expr. If there are syntax errors in x and allow_error = TRUE, the data frame has an attribute PARSE_ERROR that stores the error object.


evaluate

Parsing and Evaluation Tools that Provide More Details than the Default

v0.14
MIT + file LICENSE
Authors
Hadley Wickham [aut], Yihui Xie [aut, cre] (<https://orcid.org/0000-0003-0645-5666>), Michael Lawrence [ctb], Thomas Kluyver [ctb], Jeroen Ooms [ctb], Barret Schloerke [ctb], Adam Ryczkowski [ctb], Hiroaki Yutani [ctb], Michel Lang [ctb], Karolis Koncevičius [ctb]
Initial release

We don't support your browser anymore

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