Skip to content

na_rm #54

@ghost

Description

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"}] 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions