Ensure all columns in the object are atomic.

atomize(object, ...)

# S4 method for data.frame
atomize(object)

# S4 method for DataFrame
atomize(object)

# S4 method for Ranges
atomize(object)

Arguments

object

Object.

...

Additional arguments.

Value

Modified object. Non-atomic columns (e.g. list or complex S4 classes) will be dropped.

See also

  • base:::as.data.frame.matrix().

  • S4Vectors:::as.data.frame.DataTable().

Examples

df <- S4Vectors::DataFrame(a = "a", b = list(a = seq_len(3))) lapply(df, is.atomic)
#> $a #> [1] TRUE #> #> $b.a #> [1] TRUE #>
x <- atomize(df)