[R] dplyr or plyr or both?

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Thu Sep 15 23:29:29 CEST 2016


You are ignoring the warning issued when you load plyr after dplyr and then complaining. Simply reversing the sequence of library statements is sufficient to fix your example.

I agree that it is not ideal and that using just one at a time is easier, but you can use both, and for now a lot of packages use plyr and are not going to be rewritten for dplyr because dplyr doesn't do everything plyr does.

The more subtle problem with using both is that you may need to be explicit about which package's function to use with dplyr:: or plyr:: notation, so WHERE POSSIBLE I also recommend using dplyr.
-- 
Sent from my phone. Please excuse my brevity.

On September 15, 2016 1:28:51 PM PDT, Frans Marcelissen <fransiepansiekevertje at gmail.com> wrote:
>I never realised that nonsense results don’n bother experienced
>users….. Probably I am not experienced wiith my 6years of R
>professional work.
>I think your advise is incomplete: a %>% dplyr::group_by(groep) %>%
>dplyr::summarise(m=mean(v),n=dplyr::n())
>Gives the same problems and makes the line ugly. Or how would you do
>this?
>I stick with my advise: use dplyr. if you do not need plyr: stay away
>from it. If you need it: do not attach it, but use the plyr:: notation.
>I agree that plyr is something else as dplyr, and unfortunately plyr
>will be used for some time.
>
>Verzonden vanuit Mail voor Windows 10
>
>Van: Jeff Newmiller



More information about the R-help mailing list