Skip to content
Prev 3540 / 29559 Next

kriging output

On Mon, 5 May 2008, Edzer Pebesma wrote:

            
Right. ifelse() is vectorised, but if() else is not, so the vector 
condition in ifelse() splits out nicely, but if() else is flow control on 
a scalar condition. The above for loop looks redundant anyway (no use of 
index), but the if() else construction wouldn't work either - as you 
found out earlier.

For things like this, Braun & Murdoch is good (and from Canada!); if you 
read German, Uwe Ligges' book is recommended. It's also in the online 
Introduction to R, section 9.2.1, which explains the previous paragraph 
much more clearly than I can.

Roger