Francesco Brundu
2014-Apr-19 10:05 UTC
[R] How to use rainbow function without the gamma argument
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]]
Boris Steipe
2014-Apr-19 21:18 UTC
[R] How to use rainbow function without the gamma argument
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.