knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "README-" )
The goal of listchr is to flatten list-columns of a data frame into strings, in order to export it to a more simple format (csv, ...).
The reverse transformation (separated string to list) can also be done.
You can install listchr from github with :
# install.packages("devtools") devtools::install_github("py-b/listchr")
Convert all list-columns of a data frame into character vectors :
library(listchr) df <- data.frame(x = 1:2) df$y <- list(letters[1:3], 1:2) df$z <- list(list(3:4, 5:7), "d") str(df) df2 <- listcol_to_chr(df) str(df2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.