encodeListColumns: Encode list-columns in a dataframe as character using base64...

Description Usage Arguments Details Value Examples

Description

Encoded columns are detected, encoded with base64 and column names are appended with "__encoded" so that the decoder knows it. Other columns are not transformed

Usage

1

Arguments

df

dataframe

Details

This is helpful in writing dataframes with list-columns to disk as delimited formats and read them back

Value

A dataframe where list-columns are encoded using base64 and those column names are appended by "__encoded"

Examples

1
2
3
4
5
6
7
library("magrittr")
trialDF <- tibble::tibble(x = 1:10
                          , y = c(list(list(iris)), as.list(2:10))
                          )
trialDF
trialDF %>% encodeListColumns()
trialDF %>% encodeListColumns() %>% decodeListColumns()

talegari/sidekicks documentation built on May 30, 2019, 8:40 a.m.