[R] Understanding namespace for plyr / dplyr

2014-01-29 Thread Trevor Davies
I think I have a hole in my understanding of how R uses packages (or at least how it gives functions in packages priority). I thought I would give the new dplyr package a test drive this morning (which is blazingly fast BTW) and I've gone down the rabbit hole. The issue is that I'm unable to use

Re: [R] Understanding namespace for plyr / dplyr

2014-01-29 Thread Peter Langfelder
In short, use dplyr::summarize or plyr::summarize to select the one you want. HTH, Peter On Wed, Jan 29, 2014 at 2:19 PM, Trevor Davies davies.tre...@gmail.com wrote: I think I have a hole in my understanding of how R uses packages (or at least how it gives functions in packages priority). I

Re: [R] Understanding namespace for plyr / dplyr

2014-01-29 Thread Ista Zahn
Hi Trever, See help(::) and help(detach) Best, Ista On Wed, Jan 29, 2014 at 5:19 PM, Trevor Davies davies.tre...@gmail.com wrote: I think I have a hole in my understanding of how R uses packages (or at least how it gives functions in packages priority). I thought I would give the new dplyr

Re: [R] Understanding namespace for plyr / dplyr

2014-01-29 Thread Trevor Davies
Thanks - that's solves my problems. All the best - Trevor On Wed, Jan 29, 2014 at 2:28 PM, Ista Zahn istaz...@gmail.com wrote: Hi Trever, See help(::) and help(detach) Best, Ista On Wed, Jan 29, 2014 at 5:19 PM, Trevor Davies davies.tre...@gmail.com wrote: I think I have a hole in

Re: [R] Understanding namespace for plyr / dplyr

2014-01-29 Thread Hadley Wickham
If you load plyr first, then dplyr, I think everything should work. dplyr::summarise works similarly enough to plyr::summarise that it shouldn't cause problems. Hadley On Wed, Jan 29, 2014 at 4:19 PM, Trevor Davies davies.tre...@gmail.com wrote: I think I have a hole in my understanding of how

Re: [R] Understanding namespace for plyr / dplyr

2014-01-29 Thread arun
Hi, You can use dplyr:::summarise For e.g. library(plyr) library(dplyr) summarise function (.data, ...)  -- } environment: namespace:plyr library(Lahman)  Batting %.% group_by(playerID) %.% summarise(total=sum(G))%.% head(5) #    total #1 4988101  Batting %.%

Re: [R] Understanding namespace for plyr / dplyr

2014-01-29 Thread Trevor Davies
Hi Hadley, Thanks for getting back to me - the dplyr package seems really great. The issue I have is that the groupings no longer works when I'm using the plyr::summarise function Here is my code, I think it's pretty obvious what I'm trying to do: data_df - tbl_df(full.data) group_year -

Re: [R] Understanding namespace for plyr / dplyr

2014-01-29 Thread Ista Zahn
On Jan 29, 2014 5:47 PM, Trevor Davies davies.tre...@gmail.com wrote: Hi Hadley, Thanks for getting back to me - the dplyr package seems really great. The issue I have is that the groupings no longer works when I'm using the plyr::summarise function That is presumably why you should load