search for: 800km

Displaying 2 results from an estimated 2 matches for "800km".

Did you mean: 500km
2012 Apr 05
2
random sample from list
...##example data #load map of land files<-list.files(path=paste(system.file(package="dismo"),"/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&l...
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",