> Date: Thu, 13 Jan 2005 12:42:59 -0800
> From: [EMAIL PROTECTED]
> 
> I don't understand this behavior:
> 
> > a <- c(0, 1, 2, 3)
> > b <- c(1, 2, 3, 4)
> > ifelse (a == 0, 0, b[a])
> [1] 0 2 3 1
> 
> rather than the desired 0 1 2 3.  Thanks for any explanation.
> 
Look at b[a].

Ray

______________________________________________
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

Reply via email to