Error in pivot_wider : could not find function "pivot_wider"

After installing the following:

install.packages("devtools")
install.packages("tidyr")
library(devtools)
library(tidyr)

devtools::install_github("tidyverse/tidyr")

R can't find the function "pivot_wider":

Error in pivot_wider(traits, id_cols = accspeciesname, names_from = TraitName, :
could not find function "pivot_wider"

However, when I look it up in RStudio help, it does find it. I don't know what else to do. I am following instructions as shown in: https://tidyr.tidyverse.org and no errors are shown during the packages' installation neither from CRAN or GitHub.

You have loaded tidyr from CRAN first without pivot_wider(). You need to load the dev version from github after installing it.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.