Skip to content
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

Add support for vectorized paths #101

Open
colearendt opened this issue Jun 13, 2017 · 1 comment
Open

Add support for vectorized paths #101

colearendt opened this issue Jun 13, 2017 · 1 comment

Comments

@colearendt
Copy link
Owner

For programming, it would be nice to allow for vectorized paths. At present, it is possible to workaround with do.call, but this does not work nicely in a pipeline.

I think a useful (and tidy) way of implementing would be the tidyeval framework that was recently added to the rlang package.

  • Bonus : If it is possible to somehow vectorize (or automate) type-determination (like the readr package does), I believe that would make for a nice solution to the typing required for spread_values!
@colearendt
Copy link
Owner Author

Some thoughts on a readr-like approach:

  • Determine names, handle missing or duplicates... Maybe handle recursion first to get all possibilities for consistent naming, rather than deduplicating while recursing
  • Generate json_spec (requires json_spec class). Some methods for this: json_skip,json_factor,json_dbl,json_chr,json_int,json_lgl,json_date,json_datetime,json_only... naming convention up for grabs using the purrr or the readr conventions
  • Execute json_spec to spread out the JSON as designated.

The hope is that this could be combined together into a single spread_json function which has nice guess behavior like spread_all, but is also easily standardized like spread_values, but with less typing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant