-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expand for deeply-nested fields #47
Comments
These results can be quite challenging to deal with, for sure. Taking a quick look at the results of:
Relying on the "print" method for complex R data structures can be misleading. I use the
Note that each
This flattens the
|
Thanks for the explanation! Could you add a similar example to the vignette? I think it is general enough and it would be very useful because a lot of data is nested quite deeply. |
The package vignette provides an example for expanding first level fields to obtain a data frame. However, the approach does not work for deeper nested fields. For example,
produces a list with all children of the
samples
field concatenated into a comma-separated string without field names, e.g.This is of limited utility as the order of the fields cannot be trusted, so the values cannot be reliably mapped back to field names. The only work-around I could find was to provide a custom respond handler to prevent jsonlite from simplifying the vectors (and consequently other structures).
However, it would be nice if such expansion happened automatically when
results
are called.The text was updated successfully, but these errors were encountered: