[R] NA's from GRASS-package

Martin Wegmann mailinglist.wegmann at web.de
Mon Oct 13 17:30:17 CEST 2003


Hello, 

I run R inside GRASS and tried to obtain values of a raster file inside GRASS 
but this raster image contains only a few relevant pixel and approx. 1.5 
Mill. NA's, I did

G <- gmeta()
sites1 <- rast.get(G, "sites1")
df.sites1 <- data.frame(east(G), north(G), sites1, na.action=na.omit)
Error in as.data.frame.default(x[[i]], optional = TRUE) :
        can't coerce function into a data.frame

executing it without na.action works fine but with 1.5 Mill. redundant values. 

any advice how I receive the relevant 100 values without the NA's?

thanks in advance cheers Martin




More information about the R-help mailing list