Error in function_list[[i]](value) : could not find function "pivot_wider"

Please help, I loaded tidyverse/tidyr and same error.

tab_data<-
freq_data %>%
pivot_wider(names_from = 'Hired',values_from ='n')%>%
as.data.frame()

You need to use the tidyr package.

library(tidyr) or library(tidyverse)

Make sure you have the packages installed first.

e.g. install.packages("tidyverse")

1 Like