search for: z_nonna

Displaying 2 results from an estimated 2 matches for "z_nonna".

Did you mean: inonna
2012 Apr 05
2
random sample from list
...ot;),"/ex",sep=""),pattern="grd",full.names=TRUE) mask <- raster(files[[9]]) #make point data pts<-randomPoints(mask,100) #extract the unique cell numbers within a 800km buffer of the points, remove NA cells z <- extract(mask, pts, buffer=800000,cellnumbers=T) z_nonna <- lapply(z, na.omit) ###########PROBLEM AREA########## ##If I convert this to a dataframe and find the unique "cells" values #z2<-as.data.frame(do.call(rbind,z_nonna)) #z_unique<-unique(z2[,1]) ##I can tell there there are 9763 unique "cells" values #How do I randomel...
2012 Mar 25
2
avoiding for loops
I have data that looks like this: > df1 group id 1 red A 2 red B 3 red C 4 blue D 5 blue E 6 blue F I want a list of the groups containing vectors with the ids. I am avoiding subset(), as it is only recommended for interactive use. Here's what I have so far: df1 <- data.frame(group=c("red", "red", "red", "blue",