Coerce an R object to an nlist_object().

# S3 method for ml_analysis
as.nlist(x, ...)

Arguments

x

An R object.

...

Unused

Value

An nlist object.

Methods (by class)

  • numeric: Coerce named numeric vector to nlist

  • list: Coerce list to nlist

  • data.frame: Coerce data.frame to nlist

Examples

as.nlist(list(x = 1:4))
#> Warning: `as.nlist()` is deprecated as of nlist 0.1.1. #> Please use `as_nlist()` instead. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated.
#> $x #> [1] 1 2 3 4 #> #> an nlist object with 1 numeric element
as.nlist(c(`a[2]` = 3, `a[1]` = 2))
#> Error in is_incomplete_terms(terms): could not find function "is_incomplete_terms"