{"action":"created","issue":{"url":"https://api.github.com/repos/tidyverse/readr/issues/303","repository_url":"https://api.github.com/repos/tidyverse/readr","labels_url":"https://api.github.com/repos/tidyverse/readr/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/tidyverse/readr/issues/303/comments","events_url":"https://api.github.com/repos/tidyverse/readr/issues/303/events","html_url":"https://github.com/tidyverse/readr/issues/303","id":114536500,"number":303,"title":"Write/read simple list-columns?","user":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"labels":[{"id":386473487,"url":"https://api.github.com/repos/tidyverse/readr/labels/collector","name":"collector","color":"bfdadc","default":false},{"id":49349397,"url":"https://api.github.com/repos/tidyverse/readr/labels/enhancement","name":"enhancement","color":"1d76db","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2015-11-02T06:48:18Z","updated_at":"2016-12-07T01:37:12Z","closed_at":"2016-06-09T14:38:11Z","body":"I realize this is probably a non-starter.\n\nBut if a `dplyr` workflow leaves you with a simple list-column and you want to write the data frame out to text file, you're stuck with `dput()`. By simple, I mean the elements are atomic vector. But a human-readable and GitHub/Excel-viewable tsv or csv is so much nicer.\n\nThe way this data frame is displayed by `View()` in RStudio is sort of tantalizing. Could `readr` ever support this sort of write/read?\n\n``` r\nlibrary(dplyr)\nn <- 3\nset.seed(4)\ndf <- data_frame(x = seq_len(n)) %>% \n  mutate(y = replicate(n, sample(seq_len(n), 3), simplify = FALSE))\ndf\n#> Source: local data frame [3 x 2]\n#> \n#>       x        y\n#>   (int)   (list)\n#> 1     1 <int[3]>\n#> 2     2 <int[3]>\n#> 3     3 <int[3]>\ndf %>% View()\nwrite_tsv(df, \"foo.tsv\") # :(\n#> Error: Don't know how to handle vector of type list.\n```\n"},"comment":{"url":"https://api.github.com/repos/tidyverse/readr/issues/comments/265329649","html_url":"https://github.com/tidyverse/readr/issues/303#issuecomment-265329649","issue_url":"https://api.github.com/repos/tidyverse/readr/issues/303","id":265329649,"user":{"login":"jennybc","id":599454,"avatar_url":"https://avatars.githubusercontent.com/u/599454?v=3","gravatar_id":"","url":"https://api.github.com/users/jennybc","html_url":"https://github.com/jennybc","followers_url":"https://api.github.com/users/jennybc/followers","following_url":"https://api.github.com/users/jennybc/following{/other_user}","gists_url":"https://api.github.com/users/jennybc/gists{/gist_id}","starred_url":"https://api.github.com/users/jennybc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jennybc/subscriptions","organizations_url":"https://api.github.com/users/jennybc/orgs","repos_url":"https://api.github.com/users/jennybc/repos","events_url":"https://api.github.com/users/jennybc/events{/privacy}","received_events_url":"https://api.github.com/users/jennybc/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T01:37:12Z","updated_at":"2016-12-07T01:37:12Z","body":"If this ever gets reconsidered, here's a related discussion from Bioconductor.\r\n\r\nhttps://support.bioconductor.org/p/83911/\r\n\r\n... which also has `DataFrame`s which can hold non-standard vectors, e.g. a `CharacterList` column. Like readr, writing/reading these columns to/from a plain text delimited file is NOT currently possible. @lawremi describes a concrete work-around-flow re: \"compound cells\" based on comma-delimited strings and `strsplit()` + `unstrsplit()`. Mentions that `data.table::fread()` might support something like this."}}
{"actor":{"display_login":"jennybc"}}