search for: whewn

Displaying 1 result from an estimated 1 matches for "whewn".

Did you mean: when
2006 Dec 12
6
ifelse question
Dear R-helpers, How come that in the following code the rnorm() function is evaluated only once for each branch of the 'ifelse' ? x <- rnorm(10) y1 <- ifelse(x > 0, rnorm(1) , rnorm(1)) What is the right way to make it called/evaluated for each row, apart from a 'for' loop ? Thanks, Jacques.