Re: [R] plyr and table question

2009-04-03 Thread ts8


baptiste auguie-2 wrote:
> 
> 
> ddply(d, .(website), transform, count = table(user_id)) # why two new
> columns? 
> 
> 

Try this to see why:

  as.data.frame(table(d$user_id))

This works more like you expect:

  ddply(d, .(website), transform, count = unclass(table(user_id)))  

- Tom
-- 
View this message in context: 
http://www.nabble.com/plyr-and-table-question-tp22865174p22868047.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Problem with ggplot2

2008-12-17 Thread ts8

I'm also getting this error with ggplot2_0.8.1 on winXP with R 2.8.0 and R
2.7.1. 



hadley wrote:
> 
> Hi David,
> 
> I inadvertently introduced a bug in ggplot in the last release.  I
> uploaded a fix to CRAN this morning and it should be available in the
> near future.  Sorry for the inconvenience.
> 
> Regards,
> 
> Hadley
> 
> On Thu, Nov 20, 2008 at 2:49 PM, David Hajage  wrote:
>> Hello R users,
>>
>> I have an error with package ggplot2 under linux (ubuntu 8.10), R 2.8.0
>> and
>> ggplot2 0.7, everything up to date :
>>
>>> library(ggplot2)
>> Le chargement a nécessité le package : grid
>> Le chargement a nécessité le package : reshape
>> Le chargement a nécessité le package : plyr
>> Le chargement a nécessité le package : proto
>> Le chargement a nécessité le package : RColorBrewer
>> Le chargement a nécessité le package : splines
>> Le chargement a nécessité le package : MASS
>>
>> Attachement du package : 'ggplot2'
>>
>>
>>The following object(s) are masked from package:grid :
>>
>> nullGrob
>>
>>>   qplot(mpg, wt, data=mtcars)
>> Erreur dans gList(...) : Only 'grobs' allowed in 'gList'
>>
>> I don't understand : this code is working on my work computer (windows
>> 2000).
>>
>> I forgot something ?
>>
>> Thank you very much.
>>
>> david
>>
>>[[alternative HTML version deleted]]
>>
>>
>> __
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
> 
> 
> 
> -- 
> http://had.co.nz/
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-ggplot2-tp20613210p21057683.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.