Skip to content
Prev 245648 / 398506 Next

with(data.frame,ifelse(___,___,___))

It produces those results accidently.  Look
at the output of the ifelse call, before you
stuff it into data$f1:
  > ifelse(TRUE, 0.0001, data$f1)
  [1] 1e-04
The output of ifelse(condition,ifTrue,ifFalse)
is the length of the condition argument and has
nothing to do with the length of the ifTrue
or ifFalse arguments.  `$<-.data.frame`(x,name,value)
will expand the value argument to the nrow(x).

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com