[R] Help

John Kane jrkrideau at inbox.com
Sat Jun 30 21:41:21 CEST 2012


It looks like we have different versions of software loaded.
I have R version 2.15.0 (2012-03-30) 

My packages.
reshape2_1.2.1 ggplot2_0.9.0

Hannah's packages.
R version 2.12.2 (2011-02-25)
 quantreg_4.71 SparseM_0.89  reshape2_1.1  ggplot2_0.8.9 proto_0.3-9.2
[6] reshape_0.8.4 plyr_1.6


It looks like quantreg is causing a problem since Peter says that the function is in the quantreg *package*.

The first step would probably be to make sure that quantreg is not loaded and try the code again.  It "probably" would work with an older version of ggplot2 and the old version of reshape.  The command : unattach(package::quantreg) should work.  

Retry the code and see what happens.

However I I think that you need to upgrade your version of R, and both  ggplot2 and reshape2.  .  If I remember correctly your version of ggplot2 is loading reshape and plyr automatically as you mention below.  The newer version does not and one need to explicitly load reshape2.and plyr.  So  it is possible that  reshape_0;8.4 is masking reshape2_1.2.1 which can cause problems.

I'd suggest upgrading R,  , make sure that quantreg is not being loaded automatically, or if it is unattach it( see above|),  and then upgrade both reshape2 and ggplot to to the most recent versions and see what happens running the code from my first post.


Best of luck.

John Kane
Kingston ON Canada


> -----Original Message-----
> From: hannah.hlx at gmail.com
> Sent: Sat, 30 Jun 2012 14:59:19 -0400
> To: ehlers at ucalgary.ca
> Subject: Re: [R] Help
> 
> The following is what I get when I run the code.
> 
> 
>> library(ggplot2)
> Loading required package: reshape
> Loading required package: plyr
> 
> Attaching package: 'reshape'
> 
> The following object(s) are masked from 'package:plyr':
> 
>     rename, round_any
> 
> Loading required package: grid
> Loading required package: proto
>> library(reshape2)
> 
> Attaching package: 'reshape2'
> 
> The following object(s) are masked from 'package:reshape':
> 
>     colsplit, melt, recast
> 
>> 
>> A  <-  data.frame( m = (rep("A", 10)) , b=rnorm(10), c = rnorm(10))
>> B  <-  data.frame( m = (rep("B", 10)) , b=rnorm(10), c = rnorm(10))
>> C  <-  data.frame( m = (rep("C", 10)) , b=rnorm(10), c = rnorm(10))
>> 
>> mydata  <-  rbind( A, B, C )
>> names(mydata)  <-  c( "group", "k1", "k2" )
>> mdata  <-  melt(mydata)
> Using group as id variables
>> 
>> p  <-  ggplot( mdata , aes(variable, value , colour = variable )) +
> geom_boxplot() +
> +           facet_grid( group ~ .)
>> p
> Error in rq.fit.br(x, y, tau = tau, ...) : Singular design matrix
> In addition: Warning message:
> In is.na(rows) : is.na() applied to non-(list or vector) of type 'NULL'
>> 
> 
> 
> And my session info is as below:
> 
> 
>> sessionInfo()
> R version 2.12.2 (2011-02-25)
> Platform: i386-apple-darwin9.8.0/i386 (32-bit)
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] grid      stats     graphics  grDevices utils     datasets  methods
> [8] base
> 
> other attached packages:
> [1] quantreg_4.71 SparseM_0.89  reshape2_1.1  ggplot2_0.8.9 proto_0.3-9.2
> [6] reshape_0.8.4 plyr_1.6
> 
> loaded via a namespace (and not attached):
> [1] stringr_0.5
> 
> 
> When I tried to load package ggplot, I was asked to also load some of the
> other packages, for example "plyr". Thanks.
>     Hannah
> 
> 2012/6/30 Peter Ehlers <ehlers at ucalgary.ca>
> 
>> On 2012-06-30 07:04, John Kane wrote:
>> 
>>> 
>>>    Hi Hannah,
>>>    I have run both the original code and the code copied from the email
>>> and
>>>    both seem to work just fine.
>>>    I don't know why you are getting that error message.   Do you have
>>> both
>>>    ggplot2 and reshape2 loaded?  Still that should not give you the
>>> error
>>>    message you are getting. In fact given the data I supplied, I just
>>> don't
>>>    understand what it is trying to say.
>>>    I cannot even find a function [1]rq.fit.br.
>>> 
>> [...]
>> 
>> This function is in the quantreg *package*. So Hannah isn't
>> telling us the whole story.
>> 
>> Peter Ehlers
>> 
>> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.

____________________________________________________________
FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family!
Visit http://www.inbox.com/photosharing to find out more!



More information about the R-help mailing list