Could not find function mutate_if

16,385

When I was having this problem, I also got the error message "there is no package called 'pillar'" while loading the dplyr package. (Re-installing dplyr didn't seem to install pillar.) Installing the pillar package allowed things to work again.

Share:
16,385
jay
Author by

jay

Updated on June 12, 2022

Comments

  • jay
    jay almost 2 years

    I am trying to use the function mutate_if under dplyr() package to convert all the character columns to factor columns. I am aware of alternate approaches for this transfromation, but I am curious to see how mutate_if works. I tried the following command:

    df <-df %>% mutate_if(is.character,as.factor)
    

    But I am geting a message, :

    could not find function mutate_if

    I reinstalled dplyr() but still I am getting the same error message.

  • IRTFM
    IRTFM over 7 years
    There is a mutate_if listed in the index of the version of dplyr that is up-to-date per CRAN.
  • taha mokfi
    taha mokfi over 7 years
    I checked the most recent pdf of CRAN there was noting.
  • IRTFM
    IRTFM over 7 years
    Your powers of searching seem week, my friend. Pages 49 and 66 are listed in the Index and the string mutate_if appears 6 times in the version 0.5.0 document: cran.r-project.org/web/packages/dplyr/dplyr.pdf