Skip to content

mutate(var = NULL) results in error #129

@rossellhayes

Description

@rossellhayes

Within regular dplyr, setting a variable to NULL removes that column:

library(dplyr, warn.conflicts = FALSE)

tibble(a = 1:3, b = 4:6) %>%
  mutate(a = NULL)
#> # A tibble: 3 x 1
#>       b
#>   <int>
#> 1     4
#> 2     5
#> 3     6

Following these same steps within a lazy_dt with dtplyr produces an error:

library(dtplyr)
library(dplyr, warn.conflicts = FALSE)

tibble(a = 1:3, b = 4:6) %>%
  lazy_dt() %>%
  mutate(a = NULL) %>%
  as_tibble()
#> Error: Invalid input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions