Skip to content

NULL in Mutate as result of expression #2945

@aaronjg

Description

@aaronjg

If a column is set to NULL in mutate it is deleted. However, this does not work if mutate is returned as a result of an expression. It would also be nice if you could use NULL in summarize to exclude a column as well, but maybe that should go into a new feature request?

> df <- data.frame(a=5,b=6) 
> df %>% mutate(a= NULL)
  b
1 6
> z <- NULL
> df %>% mutate(a=z)
Error: Unsupported type NILSXP for column "a

Previous discussion of the NULL feature.
#462
8104dd6

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions