atomize {networkLite} | R Documentation |
Convert Lists to Atomic Vectors Where Possible
Description
Convert Lists to Atomic Vectors Where Possible
Usage
atomize(x, ...)
## S3 method for class 'networkLite'
atomize(x, ..., upcast = FALSE)
## S3 method for class 'tbl_df'
atomize(x, ..., upcast = FALSE)
Arguments
x |
A |
... |
additional arguments |
upcast |
logical; are we allowed to upcast atomic types when converting lists to atomic vectors? |
Details
The tibble
method examines each column of the tibble
and replaces the column with the result of calling unlist
on
the column if all of the following are true: the column
is.list
of length greater than zero, each element of which
is.atomic
of length one, and either upcast
is
TRUE
or there is only one unique class among all elements
of the column.
The networkLite
method applies the tibble
method to
the edgelist and vertex attribute tibble
s in the
networkLite
.
Value
The networkLite
or tibble
with list columns replaced by
atomic vector columns where possible.
[Package networkLite version 1.0.5 Index]