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

2014-04-20 Thread Francesco Brundu
Hi Boris, yes I tried this way and it worked. The fact is that I wanted to be compliant with the old code, I did not want to change anything. So I wanted to find a new way to rewrite the code. Thanks ~ Francesco Brundu On 19 April 2014 23:18, Boris Steipe boris.ste...@utoronto.ca wrote: Have

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

2014-04-20 Thread Francesco Brundu
Thanks Boris for the detailed answer. I thought to make it backward compatible because I did not know if gamma parameter would change the result if absent. As far as I can see changes in my results are not relevant, so I think to follow your advice to update the old code. Thanks ~ Francesco

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

2014-04-19 Thread Francesco Brundu
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,

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

2014-04-19 Thread Boris Steipe
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

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

2014-04-19 Thread Boris Steipe
If it MUST be parameter-compatible with the old call, you could just add ... to your local version of rainbow. The unused parameter will then be dropped. Here's how: # The original creates an error ... rainbow(100, s = 1.0, v = 0.75, start = 0.0, end = 0.75, gamma = 1.5) Error in rainbow(100,