Dear R-users,
after trying and searching a long time i have the following question.
is it possible to replace to following double loop by some apply calls?
###
m1 - data.frame(v1=factor(letters[1:5]),
Try this:
mapply(function(x, y)x[match(x, y)], m2, m1)
On Fri, May 14, 2010 at 9:23 AM, Andreas Wittmann
andreas_wittm...@gmx.dewrote:
Dear R-users,
after trying and searching a long time i have the following question.
is it possible to replace to following double loop by some apply calls?
Dear Henrique Dallazuanna,
thank you very much, this really helped me.
by the way, do you thinks it is also possible to do the following loop in R?
thanks and best regards
Andreas
v1 - rnorm(10)
v2 - v1+rnorm(10)
v3 - v2+rnorm(10)
v4 - rnorm(10)
y - ifelse(v10,1,0)
dat -
3 matches
Mail list logo