List-columns are really the best thing in the world, but I wonder if there is a way to see in the terminal (at least) the beginning of the contents of my list column.
Say,
frame <- data_frame(mylist = list(list('hello', 'there'), list('hello', 'world')),
value = c(1, 2))
> frame
# A tibble: 2 x 2
mylist value
<list> <dbl>
1 <list [2]> 1
2 <list [2]> 2
Here I have no idea what's inside the list. Can I tweak pillar or tibble so that the column mylist would appear as list('hello', 'there') even at the cost of truncating the output?
Something like
> frame
# A tibble: 2 x 2
mylist value
<chr> <dbl>
1 list('hello', 'there') 1
2 list('hello', 'world') 2
That would be much more useful that having to use listviewer::jsonedit all the time
Thanks!
Part of the difficulty of printing a list column is that every list looks different You could write a print method, but it'd be difficult to write one that'd be useful for any old list column
yeah, that is true. somehow i would like to print whatever would show up in the terminal after str... but perhaps mara is right the easiest would be to play around with glimpse...