-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
46 lines (32 loc) · 868 Bytes
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# listchr
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.
## Installation
You can install *listchr* from github with :
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("py-b/listchr")
```
## Example
Convert all list-columns of a data frame into character vectors :
```{r example}
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)
```