search for: randompoints

Displaying 3 results from an estimated 3 matches for "randompoints".

2013 Apr 13
1
how can I convert a result (text) in table format in R?
Hi R user, Could you please give me some hints on how I can convert text in table format in R? I was doing model assessment using dismo package for example: bg <- randomPoints(current, 500) pvtest <- data.frame(extract(current, occtest)) avtest <- data.frame(extract(current, bg)) e2 = evaluate(model, p=pvtest, a=avtest) > e2 class : ModelEvaluation n presences : 10 n absences : 1000 AUC : 0.9952 cor : 0.6453986 max TPR+...
2012 Apr 05
2
random sample from list
...rm(list = ls()) #load libraries library(dismo) library(raster) ##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...
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",