[R] How to use rainbow function without the gamma argument

Boris Steipe boris.steipe at utoronto.ca
Sat Apr 19 23:18:14 CEST 2014


Have you looked at ?rainbow ?
Is there a reason why you don't simply leave the gamma parameter away?

Try:
pie(rep(1,100), col=rainbow(100, s = 1.0, v = 0.75, start = 0.0, end = 0.75))

Cheers,
B.


On 2014-04-19, at 6:05 AM, Francesco Brundu wrote:

> Hi all,
> I am using an old code (probably written for R 2.5) and it stops when
> calling rainbow() with gamma argument. I saw that gamma argument is not
> present in newer version of R rainbow function. How can I translate this
> line of code:
> 
> rainbow(100, s = 1.0, v = 0.75, start = 0.0, end = 0.75, gamma = 1.5)
> 
> ?
> 
> It fails with:
> 
> Error in rainbow(100, s = 1, v = 0.75, start = 0, end = 0.75, gamma = 1.5)
> :
>  unused argument (gamma = 1.5)
> Calls: nmfconsensus ... matrix.abs.plot -> image -> image.default -> rainbow
> Execution halted
> 
> Thanks
> 
> ~ Francesco Brundu
> 
> 	[[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.




More information about the R-help mailing list