roomba
roomba copied to clipboard
Doesn't work with mixed types
can't bind rows
y %>% dfs_idx(~ length(.x$goodstuff) > 0) %>%
purrr:::map_dfr(~ y[[.x]])
# Error in bind_rows_(x, .id) :
# Column `goodstuff` can't be converted from character to integer
example of issue with data:
toy_data <- jsonlite::fromJSON('
{
"stuff": {
"buried": {
"deep": [
{
"goodstuff": "here",
"name": "Bob Rudis",
"secret_power": 5,
"other_secret_power": []
},
{
"goodstuff": "here",
"name": "Amanda Dobbyn",
"secret_power": 4,
"more_nested_stuff": 4
}
],
"alsodeep": 2342423234,
"deeper": {
"foo": [
{
"goodstuff": 5,
"name": "barb",
"secret_power": []
},
{
"goodstuff": "here",
"name": "borris"
}
]
}
}
}
}', simplifyVector = FALSE)
y <- toy_data %>% replace_null()
y %>% dfs_idx(~ length(.x$goodstuff) > 0) %>%
purrr:::map_dfr(~ y[[.x]])
I just checked with the new roomba() function - still get same error.