[GRASS-stats] SpatialGridDataFrame simple selection problem
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Fri Nov 12 02:34:35 EST 2010
On 11/11/2010 09:50 PM, Chris Carleton wrote:
> for (i in modelRast_df$index) {
> modelRast_df[index,'probability'] <-
> calcProb(modelRast_df[modelRast_df$index ==
> 1,],vect_pts,buffer_df,distkernel,pdfkernel)
> }
The R way to clean this up includes vectorizing calcProb:
modelRast$probability = calcProb(modelRast_df, vect_pts, ...)
Think vectors, not numbers.
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the grass-stats
mailing list