as_nlist {nlist} | R Documentation |
Coerce to nlist
Description
Coerce an R object to an nlist_object()
.
Usage
as_nlist(x, ...)
as.nlist(x, ...)
## S3 method for class 'numeric'
as_nlist(x, ...)
## S3 method for class 'list'
as_nlist(x, ...)
## S3 method for class 'data.frame'
as_nlist(x, ...)
## S3 method for class 'mcmc'
as_nlist(x, ...)
## S3 method for class 'mcmc.list'
as_nlist(x, ...)
as.nlists(x, ...)
Arguments
x |
An 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 -
mcmc
: Coerce mcmc (with one iteration) to nlist -
mcmc.list
: Coerce mcmc.list (with one iteration) to nlist
See Also
Other coerce:
as_nlists()
Examples
as_nlist(list(x = 1:4))
as_nlist(c(`a[2]` = 3, `a[1]` = 2))
[Package nlist version 0.3.3 Index]