dplyr function conflicts

272 views
Skip to first unread message

kristofkelemen

unread,
Oct 4, 2018, 8:47:14 AM10/4/18
to manipulatr
I have lots of code using dplyr syntax to manipulate data. I added some new packages and suddenly there is problem with select, but also with summarize functions. I hate writing dplyr::select, because it makes code unreadable. Is there a way to resolve this conflict? Are there any suggestions made to developers?

Brandon Hurr

unread,
Oct 4, 2018, 10:35:19 AM10/4/18
to kristof...@gmail.com, manipulatr
What are you loading that is overridding dplyr::select? 

Typically, the preference is to load tidyverse packages last so that they mush everything loaded before, but if you need the functions in another package then that's no good either. 

You could try the new conflicted package to "prefer" one over the other. 


HTH,
B

On Thu, Oct 4, 2018 at 5:47 AM kristofkelemen <kristof...@gmail.com> wrote:
I have lots of code using dplyr syntax to manipulate data. I added some new packages and suddenly there is problem with select, but also with summarize functions. I hate writing dplyr::select, because it makes code unreadable. Is there a way to resolve this conflict? Are there any suggestions made to developers?

--
You received this message because you are subscribed to the Google Groups "manipulatr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to manipulatr+...@googlegroups.com.
To post to this group, send email to manip...@googlegroups.com.
Visit this group at https://groups.google.com/group/manipulatr.
For more options, visit https://groups.google.com/d/optout.

kristofkelemen

unread,
Oct 5, 2018, 3:09:22 AM10/5/18
to manipulatr
Thanks for the ideas, I really like the conflicted package.
I am using RStudio and I think once I load a package I cannot load it again. So typically, I write some code that works, and then if I need to reexecute, it doesn't. Often, I don't know what is the conflicting package, my guess is mainly MASS, because lots of functions I use depend on other functions in MASS. But for example, summarize also stopped working now, and as far as I know, there is no summarize function in MASS.

To sum up, conflicted package seems to work now, I hope this solves my issues in the long turn.

Have a nice day,

Kristof
Reply all
Reply to author
Forward
0 new messages