Re: [R] cor() function, method=spearman

2005-10-08 Thread Peter Dalgaard
[EMAIL PROTECTED] writes: Hello, Does anyone know if the cor function, when method = spearman, returns a correlation coefficient corrected for any ties in the ranks of the data? I have data with quite a few ties and am thinking that I should use a calculation of the coefficient

Re: [R] Converting PROC NLMIXED code to NLME

2005-10-08 Thread Peter Dalgaard
Singh, Jatinder [EMAIL PROTECTED] writes: Hi, I am trying to convert the following NLMIXED code to NLME, but am running into problems concerning 'Singularity in backsolve'. As I am new to R/S-Plus, I thought I may be missing something in the NLME code. Which version of R and NLME? R 2.2.0

Re: [R] missing values in step procedure

2005-10-08 Thread Bernardo Rangel Tura
At 11:11 7/10/2005, you wrote: Hi, I have the problem that for the step procedure stops due to missing values. There are no options in Step or stepAIC to handle missing values. Is there any way to run stepwise modelselection in R in an automated way in this case? Here is the last step before it

Re: [R] Converting PROC NLMIXED code to NLME

2005-10-08 Thread Bernardo Rangel Tura
At 20:40 7/10/2005, Singh, Jatinder wrote: NLME kidney.nlme-nlme(model=rtime~ (event* ((b1*age+b2*sex+b3*gn+b4*an+b5*pkn+u)+log(delta)+log(gamma)+(gamma-1)*lo g(rtime)) +((-exp(b1*age+b2*sex+b3*gn+b4*an+b5*pkn+u))*delta*(rtime**gamma)) ),

[R] color for points

2005-10-08 Thread Sam R. Smith
Hi, I have the following code to randomly generate the points: csr -function(n=60){ x=runif(n) y=runif(n) f=cbind(x,y) } plot(csr()) I wonder how to code to make the first twenty points to be BLUE; second twenty points to be RED; the last twenty points to be GREEN? Thanks, Sam

Re: [R] Assign references

2005-10-08 Thread Patrick Burns
[EMAIL PROTECTED] wrote: Patrick, I'll have to check your S poetry, it's not clear why 'changing things invisibly' is a bad thing in R, but is OK in C. Perhaps the answer lies therein. I think Tony's reply has the main part of the answer. R is designed as a functional language -- meaning,

[R] square and points on the same figure

2005-10-08 Thread Sam R. Smith
Hi, I have the following code to randomly generate the points: csr -function(n=60){ x=runif(n) y=runif(n) f=cbind(x,y) } plot(csr()) I wonder how to code to draw a square centering on 0.5,0.5; with the length of each side to be 0.3 on the same figure with these plotted points? Thanks, Sam

Re: [R] color for points

2005-10-08 Thread vincent
Sam R. Smith a écrit : Hi, I have the following code to randomly generate the points: csr -function(n=60){ x=runif(n) y=runif(n) f=cbind(x,y) } plot(csr()) I wonder how to code to make the first twenty points to be BLUE; second twenty points to be RED; the last twenty points to be

Re: [R] R version 2.01.1, Crimson Editor and the one from nowhere

2005-10-08 Thread Philippe Grosjean
Hello Olivier, The problem prob ably comes from TpR.exe. It first sends Alt-w 1 before the command, to make sure the console is the active window. You should try to switch R in SDI mode, which is definitely the best mode for running R side-by-side with a text editor. Tell me if it solves the

Re: [R] square and points on the same figure

2005-10-08 Thread vincent
?rect (and don't forget par(new=T)) hih __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] R version 2.01.1, Crimson Editor and the one from nowhere

2005-10-08 Thread Philippe Grosjean
... OK, I have spot the problem: TpR.exe expects RGui running in English. Shortcut for the Windows menu is Alt-w, which is what it sends to R. Then, it sends 1, meaning, activate first window (the console). You have probably RGui running in French, or in another language. In French the menu is

[R] keeping interaction terms

2005-10-08 Thread Christian Jones
Hello,?xml:namespace prefix = o ns = urn:schemas-microsoft-com:office:office /o:p/o:p while doing my thesis in habitat modelling I´ve come across a problem with interaction terms. My question concerns the usage of interaction terms for linear regression modelling with R. If an

[R] square and points on the same figure

2005-10-08 Thread Sam R. Smith
Hi, I have the following code to randomly generate the points: csr -function(n=60){ x=runif(n) y=runif(n) f=cbind(x,y) } plot(csr()) I wonder how to code to draw a square centering on 0.5,0.5; with the length of each side to be 0.3 on the same figure with these plotted points? Thanks, Sam

Re: [R] color for points

2005-10-08 Thread jim holtman
If you know explicitly that there are just 60 points, you can use: plot(csr(),col=c(rep('blue',20), rep('red',20), rep('green',20))) On 10/8/05, Sam R. Smith [EMAIL PROTECTED] wrote: Hi, I have the following code to randomly generate the points: csr -function(n=60){ x=runif(n)

Re: [R] square and points on the same figure

2005-10-08 Thread Chuck Cleland
Sam R. Smith wrote: Hi, I have the following code to randomly generate the points: csr -function(n=60){ x=runif(n) y=runif(n) f=cbind(x,y) } plot(csr()) I wonder how to code to draw a square centering on 0.5,0.5; with the length of each side to be 0.3 on the same figure with these

Re: [R] square and points on the same figure

2005-10-08 Thread Sam R. Smith
after typing symbols(x=0.5, y=0.5, squares=c(0.3), add=TRUE) it works. I want to add one more using different length such as symbols(x=0.5, y=0.5, squares=c(0.15), add=TRUE) but this square did not show. Chuck Cleland [EMAIL PROTECTED] wrote: Sam R. Smith wrote: Hi, I have the following code to

Re: [R] square and points on the same figure

2005-10-08 Thread Chuck Cleland
Sam R. Smith wrote: after typing symbols(x=0.5, y=0.5, squares=c(0.3), add=TRUE) it works. I want to add one more using different length such as symbols(x=0.5, y=0.5, squares=c(0.15), add=TRUE) but this square did not show. Specify both (all) squares in the same call to symbols: csr

[R] Two-factor ANOVA Help

2005-10-08 Thread Jim Brindle
Hello, I am trying to perform a two-factor ANOVA analysis using a blocking design with Vol as the response variable. My intent is to have Rater treated as the treatment variable and the Pipe treated as the blocking variable. I am reading and preparing my dataset using the following three

Re: [R] keeping interaction terms

2005-10-08 Thread Frank E Harrell Jr
Your note is formatted strangely. You seem to be using Microsoft - please tell your software to send plain text e-mails - Microsoft doesn't own plain ASCII text format, at least not yet (have they applied for a patent for it?). Christian Jones wrote: Hello,?xml:namespace prefix = o ns =

[R] obfuscated identity

2005-10-08 Thread Martin Maechler
Globe == Globe Trotter [EMAIL PROTECTED] on Fri, 7 Oct 2005 16:39:10 -0700 (PDT) writes: . Globe I use this Yahoo! e-mail address as a junk e-mail Globe address since the archives contain the complete Globe e-mail address (no anti-spam measures taken) so I do

[R] Warning: condition has length 1

2005-10-08 Thread nawaf b
Hi - I was wondering if anyone came across a problem such as mine! I was trying to create a user-defined function, however, the results from calling the function are unexpected! When passing X parameter as a single value variable (x-c(3)), everything works fine. However, when passing a parameter

Re: [R] keeping interaction terms

2005-10-08 Thread Ted Harding
Adding a bit to Frank Harrell's good comments. 1. Regarding HTML infection: I rolled up my sleeves, washed my hands carefully, took a fine sharp knife, cut it all out, and then sowed up the incisions. 2. For the rest, see below. On 08-Oct-05 Christian Jones wrote: Hello, while doing

Re: [R] Warning: condition has length 1

2005-10-08 Thread Chuck Cleland
nawaf b wrote: Hi - I was wondering if anyone came across a problem such as mine! I was trying to create a user-defined function, however, the results from calling the function are unexpected! When passing X parameter as a single value variable (x-c(3)), everything works fine. However,

Re: [R] Warning: condition has length 1

2005-10-08 Thread Gabor Grothendieck
ifelse(x = 1, 0, x^2) or (x = 1) * x^2 Also, you might need x (1 - e) where e is some small number since your numbers may not be exact. On 10/8/05, nawaf b [EMAIL PROTECTED] wrote: Hi - I was wondering if anyone came across a problem such as mine! I was trying to create a user-defined

Re: [R] Warning: condition has length 1

2005-10-08 Thread Roger Bivand
On Sat, 8 Oct 2005, nawaf b wrote: Hi - I was wondering if anyone came across a problem such as mine! I was trying to create a user-defined function, however, the results from calling the function are unexpected! When passing X parameter as a single value variable (x-c(3)), everything

Re: [R] Warning: condition has length 1

2005-10-08 Thread Gabor Grothendieck
On 10/8/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: ifelse(x = 1, 0, x^2) or (x = 1) * x^2 Sorry, that should have been (x 1) * x^2 Also, you might need x (1 - e) where e is some small number since your numbers may not be exact. On 10/8/05, nawaf b [EMAIL PROTECTED] wrote: Hi

[R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Denis Chabot
Hi, A few times I tried to control the number and position of tick marks in plots with the yasp or xasp parameters. For example, a y axis was drawn by default with tick marks at 0, 20, 40, 80 and 100. I tried to get tick marks every 10 by adding yasp=(0, 100, 10) but this had no effect at

Re: [R] Two-factor ANOVA Help

2005-10-08 Thread Gabor Grothendieck
On 10/8/05, Jim Brindle [EMAIL PROTECTED] wrote: Hello, I am trying to perform a two-factor ANOVA analysis using a blocking design with Vol as the response variable. My intent is to have Rater treated as the treatment variable and the Pipe treated as the blocking variable. I am reading

Re: [R] Two-factor ANOVA Help

2005-10-08 Thread Gabor Grothendieck
On 10/8/05, Gabor Grothendieck [EMAIL PROTECTED] wrote: On 10/8/05, Jim Brindle [EMAIL PROTECTED] wrote: Hello, I am trying to perform a two-factor ANOVA analysis using a blocking design with Vol as the response variable. My intent is to have Rater treated as the treatment variable

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Marc Schwartz
On Sat, 2005-10-08 at 09:28 -0400, Denis Chabot wrote: Hi, A few times I tried to control the number and position of tick marks in plots with the yasp or xasp parameters. For example, a y axis was drawn by default with tick marks at 0, 20, 40, 80 and 100. I tried to get tick marks

Re: [R] Matrix calculations in R--erroneous?

2005-10-08 Thread Peter Muhlberger
Hi Spencer: Thanks! This gives me a number of other ways of thinking about this problem. My one concern is that these approaches would also run into some difficulties with how long it takes to calculate. I'm interested not in a single value but a matrix of over 300k values that has to be

[R] add leading 0s to %d from png() {was Automatic creation of file names}

2005-10-08 Thread bogdan romocea
Dear useRs, Is there a way to 'properly' format %d when plotting more than one page on png()? 'Properly' means to me with leading 0s, so that the PNGs become easy to navigate in a file/image browser. Lacking a better solution I ended up using the code below, but would much prefer something like

[R] request

2005-10-08 Thread nmi13
Dear All, Can someone please tell me if there is a provision in R to fit a random coefficient multinomial logistic regression. Thanks in advance for your help and suggestions. Regards Murthy.N.M __ R-help@stat.math.ethz.ch mailing list

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Prof Brian Ripley
On Sat, 8 Oct 2005, Marc Schwartz wrote: On Sat, 2005-10-08 at 09:28 -0400, Denis Chabot wrote: Hi, A few times I tried to control the number and position of tick marks in plots with the yasp or xasp parameters. For example, a y axis was drawn by default with tick marks at 0, 20, 40, 80 and

Re: [R] add leading 0s to %d from png() {was Automatic creation of file names}

2005-10-08 Thread Prof Brian Ripley
The example on the png help page, Rplot%03d.png, _is_ what you want. (More details are on ?postscript.) formatC() is an S/R peculiarity: sprintf() is the cross-language way to do this sort of thing. On Sat, 8 Oct 2005, bogdan romocea wrote: Dear useRs, Is there a way to 'properly' format %d

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Peter Dalgaard
Denis Chabot [EMAIL PROTECTED] writes: Oops, Mark, bad typo indeed. But yaxp is what I had in my R program and it did not help. I did obtain control over my tick marks by drawing them myself, as you suggest. But I was curious as to how to use yaxp since the help on par gives it as a

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Marc Schwartz
On Sat, 2005-10-08 at 16:37 +0100, Prof Brian Ripley wrote: On Sat, 8 Oct 2005, Marc Schwartz wrote: On Sat, 2005-10-08 at 09:28 -0400, Denis Chabot wrote: Hi, A few times I tried to control the number and position of tick marks in plots with the yasp or xasp parameters. For example,

[R] Rpart -- using predict() when missing data is present?

2005-10-08 Thread Ajay Narottam Shah
I am doing library(rpart) m - rpart(y ~ x, D[insample,]) D[outsample,] y x 8 0.78391922 0.579025591 9 0.06629211 NA 10 NA 0.001593063 p - predict(m, newdata=D[9,]) Error in model.frame(formula, rownames, variables, varnames, extras, extranames, :

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Denis Chabot
Hi, sorry about the bad syntax, though the right syntax would not have worked either, according to your tests (Mark, Brian, Peter). Anyway it is too finicky, I will draw them myself. For instance, plot(1:100, xaxt=n) par(xaxp=c(0, 100, 10)) # the value is reset at each plot axis(1) Placed

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Prof Brian Ripley
On Sat, 8 Oct 2005, Denis Chabot wrote: Hi, sorry about the bad syntax, though the right syntax would not have worked either, according to your tests (Mark, Brian, Peter). It DOES work according to my tests! (Do give us the credit for testing our advice: we would appreciate your showing

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Denis Chabot
Hi Brian, Le 05-10-08 à 13:21, Prof Brian Ripley a écrit : On Sat, 8 Oct 2005, Denis Chabot wrote: Hi, sorry about the bad syntax, though the right syntax would not have worked either, according to your tests (Mark, Brian, Peter). It DOES work according to my tests! (Do give us the

Re: [R] Rpart -- using predict() when missing data is present?

2005-10-08 Thread Prof Brian Ripley
On Sat, 8 Oct 2005, Ajay Narottam Shah wrote: I am doing library(rpart) m - rpart(y ~ x, D[insample,]) D[outsample,] y x 8 0.78391922 0.579025591 9 0.06629211 NA 10 NA 0.001593063 p - predict(m, newdata=D[9,]) Error in model.frame(formula,

Re: [R] quasi-random vector according to an independent graph

2005-10-08 Thread Jinfang Wang
Hi I was waiting for more advices and prepared to summarize to reduce the mail traffic. I got two answers (I realize that my explanation was definitely insufficient). Thanks Reid Spencer ! The link http://www.r-project.org/gR/ was helpful, although it does not directly answer my

Re: [R] quasi-random vector according to an independent graph

2005-10-08 Thread Spencer Graves
Hi, Jihfang: Definitely, please report to the list when you think you have a more or less satisfactory solution. The archives are searchable, and your comments might help someone else. They might also provoke useful suggestions of other things you might try that might provide even

[R] lm.ridge

2005-10-08 Thread Erin Hodgess
Dear R People: I have a question about the lm.ridge function, please. In the example, there is one set of output values in the select function but another in the comment section. Am I missing something please? R Version 2.1.1 Windows Thanks, Sincerely, Erin Hodgess Associate Professor

Re: [R] Warning: condition has length 1

2005-10-08 Thread sosman
nawaf b wrote: Hi - I was wondering if anyone came across a problem such as mine! I was trying to create a user-defined function, however, the results from calling the function are unexpected! When passing X parameter as a single value variable (x-c(3)), everything works fine. However,

Re: [R] R-2.2.0 compilation problem

2005-10-08 Thread Bill Northcott
On 07/10/2005, at 8:00 PM, Robin Hankin wrote: I tried to compile R-2.2.0 just now. configure worked fine, but compilation stopped with ld: Undefined symbols: restFP saveFP /usr/bin/libtool: internal link edit command failed make[3]: *** [libR.dylib] Error 1 make[2]: *** [R] Error 2

Re: [R] Warning: condition has length 1

2005-10-08 Thread Andrew Robinson
ifelse() should work too. Andrew On Sun, Oct 09, 2005 at 03:30:42PM +1000, sosman wrote: nawaf b wrote: Hi - I was wondering if anyone came across a problem such as mine! I was trying to create a user-defined function, however, the results from calling the function are unexpected!