kriging output
Dave Depew wrote:
Thanks,
This worked.
I'm still confused why the if else statement didn't work...
If one wanted to do conditional arithmetic would a for statement bee
needed?
e.g.
meuse.grid[["class"]] = for(i in 1:length(meuse.grid[["dist"]])){
if (meuse.grid[["dist"]]<0.5)
{meuse.grid[["class"]]=10*meuse.grid[["dist]]} else
{meuse.grid[["class"]]=100* meuse.grid[["dist"]]}
}
I'd say meuse.grid$class = ifelse(meuse.grid$dist < .5, 10, 100) * meuse.grid$dist assigning the result from a for statement also does not yield a beauty price if you ask me, but that might be my backgrounds in C, long ago. -- Edzer