ensure_atomic_columns: Ensure that all columns of a data frame are atomic vectors.

View source: R/data_manip_utils.R

ensure_atomic_columnsR Documentation

Ensure that all columns of a data frame are atomic vectors.

Description

Columns that are lists have each of their elements collapsed into strings using the sepcified separator.

Usage

ensure_atomic_columns(df, sep = ",")

Arguments

df

The data frame whose list columns should be collapsed

sep

The separator to use when collapsing vectors to scalars

Value

df with all columns converted to atomic vectors.

See Also

collapse_to_atomic()

Examples


library(S4Vectors)
x <- DataFrame(a = 1:5, b = List(split(1:25, 1:5)))
ensure_atomic_columns(x)


DarwinAwardWinner/rctutils documentation built on July 22, 2022, 5:19 a.m.