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

unbox R lists for output.json for them because df like objects don't unbox easily in json #153

Open
madeline-scyphers opened this issue Sep 11, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@madeline-scyphers
Copy link
Owner

df like objects (tibbles, etc) when doing calculations on them and jsonifying will wrap in a list unless you unbox, but you have to know that. So BOA should do that for them if it is a 1 element list.

example R code:

> library(tibble)
> library(jsonlite)

> df <- tibble('x' = runif(16, 0, 5), 'y' = runif(16, 100, 500))
> res <- df %>% select(y,x) %>% summarise('Y'=sum(y), 'X'=sum(x))
> res
[{"Y":5442.2436,"X":37.2998}]

Because this is a 1 element list with the correct dictionary insidie it, BOA should just do output = ls[0] to make everyones lives easier.

@madeline-scyphers madeline-scyphers added the enhancement New feature or request label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant