conflict of dplyr with multcomp package

dplyr

#1

Hi there:
I just want to report a conflict of dplyr with the multcomp package. After uploading multcomp, when using any function of dplyr, an error telling that there are unused arguments appears. Is there a possibility to fix this?
Thanks
Luis


#2

Loading multcomp also loads the MASS package, which has a function called select. The MASS select function will mask the dplyr select function if you load multcomp (or MASS alone) after loading dplyr. Are you having issues with any other dplyr functions when multcomp is loaded after dplyr.

Try starting a new R session and load multcomp and then dplyr. Now try using select. Does the problem go away?

Also, if you load dplyr after multcomp, but want to use the MASS select function, you can call it by doing MASS::select() instead of just select. On the other hand, if you load multcomp after loading dplyr, you can do, for example, mtcars %>% dplyr::select(mpg) to ensure that the dplyr select function is called.


#3

Hi Joels:
Problem solved. Loading first multcomp made the problem go away, and using MASS:select(), allows me to use at the same time the MASS function.
Thank you and best regards
Luis


#4

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