Skip to content
Prev 377287 / 398502 Next

jsonlite

It would make helping you easier if you presented your data
in a format that others could copy and paste into R.  E.g.,

z <- list(data.frame(favoriteValue=c(23527,21837),
Classification=c("xxxx","xyxy")),
           data.frame(favoriteValue=c(25427,21237,21997),
Classification=c("xxxx","xyxy","xyxy")),
           data.frame(favoriteValue=c(99427), Classification=c("xxxx")))

You asked from something that "looks like" comma-separated strings of
numerals.
row came from
favoriteValue Classification ID
1         23527           xxxx  1
2         21837           xyxy  1
3         25427           xxxx  2
4         21237           xyxy  2
5         21997           xyxy  2
6         99427           xxxx  3
collapse=","))
# A tibble: 3 x 2
     ID favoriteValue
  <int> <chr>
1     1 23527,21837
2     2 25427,21237,21997
3     3 99427

It is usually better say how you intend the use the result of your data
manipulation, rather that how it looks when printed.  The comma-separated
strings are not handy for answering questions like "what are the most
common favoriteValues?" or "who has the most favoriteValues?" - the format
used in zAll is better for that.


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Tue, Nov 6, 2018 at 11:06 AM, JEFFERY REICHMAN <reichmanj at sbcglobal.net>
wrote: