Skip to contents

Deconstruct R objects

Usage

deconstruct(x, return = FALSE, quote = TRUE)

Arguments

x

R object passed to dput()

quotes

include quotes in the output

console

logical, used in the console? If FALSE, then output is printed with base::noquote(). If TRUE, output is returned with cat()

Value

Deparsed object

Examples

x <- deconstruct(names(mtcars), return = TRUE)
x
#> [1] c('mpg', 'cyl', 'disp', 'hp', 'drat', 'wt', 'qsec', 'vs', 'am', 'gear', 'carb')
deconstruct(names(mtcars))
#> c('mpg', 'cyl', 'disp', 'hp', 'drat', 'wt', 'qsec', 'vs', 'am', 'gear', 'carb')