Works very similarly to parse, but also keeps original formatting and comments.
parse_all(x, filename = NULL, allow_error = FALSE)
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.
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.
string overriding the file name
whether to allow syntax errors in x