[R] apply problem
ggrothendieck@yifan.net
ggrothendieck at yifan.net
Sun Mar 17 15:36:21 CET 2002
> > > apply(iris3,1,function(x)identical(x,iris3[1,]))
> > 1 2 3
> > FALSE FALSE FALSE
> >
> > What's wrong here?
>
> iris3 is not an array, so it it coerced to one via as.matrix
[...]
> and that's not the same object as your iris3
Thanks.
Is there a way to iterate over the rows of a data
frame without writing a loop -- that was my
original objective.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list