Skip to content

dplyr::rename_with() fails with dplyr 1.0.0 #160

Closed
@jasopolis

Description

@jasopolis

I'm getting an error using rename_with() from dplyr 1.0.0 with a lazy_dt() -- it doesn't seem to be implemented. I haven't checked many other dplyr 1.0.0 additions, so I'm not sure if this is a known issue (or WIP) or a one-off function issue. Thanks!

mtcars %>% lazy_dt() %>% rename_with(str_to_upper) %>% as.data.table() %>% head()
# Error in UseMethod("rename_with") : 
#   no applicable method for 'rename_with' applied to an object of class "c('dtplyr_step_first', 'dtplyr_step')"
mtcars %>% lazy_dt() %>% rename_all(str_to_upper) %>% as.data.table() %>% head()
#    MPG CYL DISP  HP DRAT    WT  QSEC VS AM GEAR CARB
# 1: 21.0   6  160 110 3.90 2.620 16.46  0  1    4    4
# 2: 21.0   6  160 110 3.90 2.875 17.02  0  1    4    4
# 3: 22.8   4  108  93 3.85 2.320 18.61  1  1    4    1
# 4: 21.4   6  258 110 3.08 3.215 19.44  1  0    3    1
# 5: 18.7   8  360 175 3.15 3.440 17.02  0  0    3    2
# 6: 18.1   6  225 105 2.76 3.460 20.22  1  0    3    1

Metadata

Metadata

Assignees

No one assigned

    Labels

    dplyr-compat 💞dplyr compatibility issuesfeaturea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions