Re: [Rd] R-intro: length of 'ifelse' result

2016-09-14 Thread Duncan Murdoch
On 14/09/2016 11:15 AM, Suharto Anggono Suharto Anggono via R-devel wrote: In "An Introduction to R" Version 3.3.1, in "9.2.1 Conditional execution: if statements", the last paragraph is the following: There is a vectorized version of the if/else construct, the ifelse function. This has the for

[Rd] R-intro: length of 'ifelse' result

2016-09-14 Thread Suharto Anggono Suharto Anggono via R-devel
In "An Introduction to R" Version 3.3.1, in "9.2.1 Conditional execution: if statements", the last paragraph is the following: There is a vectorized version of the if/else construct, the ifelse function. This has the form ifelse(condition, a, b) and returns a vector of the length of its longest