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

na_rm #54

Open
SymbolixAU opened this issue Oct 31, 2019 · 0 comments
Open

na_rm #54

SymbolixAU opened this issue Oct 31, 2019 · 0 comments

Comments

@SymbolixAU
Copy link
Collaborator

SymbolixAU commented Oct 31, 2019

have rm_na in to_json() so NAs in columns get ignored

df <- structure(list(c = c(123, NA), d = c(456, NA), f = c(NA, "cats"
+ )), class = "data.frame", row.names = c(NA, -2L))
df
#    c   d    f
# 1 123 456 <NA>
# 2  NA  NA cats

to_json( df )
[{"c":123.0,"d":456.0,"f":null},{"c":null,"d":null,"f":"cats"}] 

would become

to_json( df, na_rm = TRUE )
[{"c":123.0,"d":456.0},{"f":"cats"}] 
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

0 participants