R: Converts basic R object into their source representation

sourcify {jmvcore} | R Documentation

## Converts basic R object into their source representation

### Description

Converts basic R object into their source representation

### Usage

    sourcify(object, indent = "")

### Arguments

`object` | the object to convert to source
`indent` | the level of indentation to use

### Value

a string of the equivalent source code

### Examples

    sourcify(NULL)

    # 'NULL'

    sourcify(c(1,2,3))

    # 'c(1,2,3)'

    l <- list(a=7)
    l[['b']] <- 3
    l[['c']] <- list(d=3, e=4)
    sourcify(l)

    # 'list(
    #      a=7,
    #      b=3,
    #      c=list(
    #          d=3,
    #          e=4))'

[Package jmvcore version 0.8.5 Index]