convertDataFrameListsToVectors: Convert columns with list in data.frame to vector

View source: R/convertDataFrameListsToVectors.R

convertDataFrameListsToVectorsR Documentation

Convert columns with list in data.frame to vector

Description

Convert columns with list in data.frame to vector

Usage

convertDataFrameListsToVectors(df, delimiter = ";")

Arguments

df

a data.frame

delimiter

a delimiter to concatenate (DEFAULT: ;)

Value

a data.frame without list columns

Note

Lists as columns are useful programmatically, but cause issue in writing output to text-based files

Examples

   
df <- data.frame(id = 1:2, name = c("Jon", "Mark"), 
  children = I(list(c("Mary", "James"), c("Greta", "Sally"))))
df <- convertDataFrameListsToVectors(df)
  

cannin/paxtoolsr documentation built on Feb. 2, 2023, 11:44 a.m.