tidyverse / purrr

A functional programming toolkit for R
https://purrr.tidyverse.org/
Other
1.27k stars 274 forks source link

`set_names` conflict with magrittr #1091

Closed clandinq closed 1 year ago

clandinq commented 1 year ago

I just updated to R 4.3.1 and updated all my packages to the latest version. I started receiving a warning from package conflicted warning about a function found in two packages: set_names is in magrittr and purrr. This is clearly a recent issue and will affect every user of tidyverse, since both packages are included there.

Here's a small example:

# Load packages
library(tidyverse)
library(conflicted)
df <- tibble(a = 1, b = 2)
df %<>% set_names(c("c", "d"))

Result: Screen Shot 2023-07-13 at 11 10 06 AM

hadley commented 1 year ago

We don't generally recommend attaching magrittr, but if you do, you can use the suggested conflicted call.