Vectorized if [Software]
Hi Öberster Größter Meister!
Disagree. Very handy function if vectorized
Typical for coders coming from C, Fortran or so relying mostly on
.
Will not work in R if you have vectors to compare. See "R Inferno" Circle 3.2, link in my post to Helmut.
Full ACK. Here R is as obscure or even more obscure as other languages. See here.
❝ I agree ifelse(a,b,c)
is a borderline silly function.
Disagree. Very handy function if vectorized
if
is needed. Used it myself heavily in my codes for simulations.❝ Like you I'd much prefer the classical if else
construct.
Typical for coders coming from C, Fortran or so relying mostly on
for
loops and without vector constructs 
Will not work in R if you have vectors to compare. See "R Inferno" Circle 3.2, link in my post to Helmut.
❝ I think this also goes to show that error messages should be user-friendly.
Full ACK. Here R is as obscure or even more obscure as other languages. See here.
—
Regards,
Detlew
Regards,
Detlew
Complete thread:
- R inferno (rant) Helmut 2015-10-27 21:06 [Software]
- R inferno (rant) ElMaestro 2015-10-28 08:44
- Vectorized ifd_labes 2015-10-28 09:42
- R inferno (without rant) d_labes 2015-10-28 09:18
- R inferno (rant) ElMaestro 2015-10-28 08:44