[R] continuous coloring of a polygon

2008-08-15 Thread Roger Leenders
R2.7.1, WinXP Hi, I have a polygon inside a circle as follows: radius - 3 x - seq(-radius,radius,length=2000) y - sqrt(radius^2-x^2) xx - c(x,-x) yy - c(y,-y) plot(xx,yy, xlim=c(-radius,radius),ylim=c(-radius,radius), type=l, ylab=, xlab=, axes=F) radius - 2.7 x1 -

Re: [R] continuous coloring of a polygon

2008-08-15 Thread Roger Leenders
), border=rainbow(1, start = 0+(0.33*i)/l)) } #you can omit this line if you do not need the border: polygon(c(x1,x2),c(y1,y2)) It's not ideal I think because for length l = 2000 it's quite slow. Maybe someone will find a much better solution. Aiste 2008/8/15 Roger Leenders [EMAIL PROTECTED

Re: [R] continuous coloring of a polygon

2008-08-17 Thread Roger Leenders
Thanks Barry, that works beautifully! Roger Barry Rowlingson schreef: 2008/8/17 Roger Leenders [EMAIL PROTECTED]: WinXP, R2.7.1 Thanks so much to all who have reponded to my inquery. The solutions are most helpful. There is only one final thing that I can't seem to get right. All

[R] running R-code outside of R

2008-06-24 Thread Roger Leenders
R 2.7.0, WinXP Hi list, I have written some code in R that I would like to share with others who are not R-users. Is there a way to compile the code so it will run outside of R? The best thing would be a functionality to compile the code into a .exe file that does not require the user to have

Re: [R] running R-code outside of R

2008-06-25 Thread Roger Leenders
, Jun 24, 2008 at 2:01 PM, Roger Leenders [EMAIL PROTECTED] wrote: R 2.7.0, WinXP Hi list, I have written some code in R that I would like to share with others who are not R-users. Is there a way to compile the code so it will run outside of R? The best thing would be a functionality to compile

[R] R interprets symbol as q()

2008-07-20 Thread Roger Leenders
R2.7.1, WinXP Hi, My question is probably easy to answer, but I can't seem to solve it myself. I need to read in a large number of datasets that were generated by another (old) software program. Each data file contains a bunch of additional code generated by the external software. It lists

[R] output layout question

2009-09-08 Thread Roger Leenders
Win7, R-2.9.1 Dear list, I have a large (nxm) matrix which is the output of an analysis. Since it is so large, I would like to use output formatting to make it easier to find particular values and patterns in the matrix. In particular, I want to print the matrix as follows: - cells with a