colearendt / tidyjson

Tidy your JSON data in R with tidyjson
Other
184 stars 15 forks source link

Make `spread_values(.x, ...)` work more like `dplyr::mutate(.data, ...)` #133

Open ramiromagno opened 3 years ago

ramiromagno commented 3 years ago

It would be nice if ... (the name-value pairs) in spread_values() would work like in dplyr::mutate(). By this I mean being able to write code like:

tbl_json %>%
spread_values(
      mean = jnumber(mean),
      counts = as.integer(jnumber(counts))
)

i.e, specify computations immediately inline such as as.integer().