How about this?

library(tripEstimation)
img <- list(x = 1:nrow(volcano), y = 1:ncol(volcano), z = volcano > 130 & volcano < 155)
pts <- cbind(rnorm(100, 50, 10), rnorm(100, 30, 8))
image(img)
points(pts, cex = 0.5)

lookup <- mkLookup(img)
ok <- lookup(pts)
text(pts, lab = substr(as.character(ok), 1, 1))

This is a simple, one time-step lookup function - you can pack these binary masks (using "bits<-") compactly using integer arrays so you can store long time series of masks, and this lookup function will extract them as needed with bits() with the by.segment argument.

(None of this is terribly user friendly or easy to explain quickly I'm afraid, as it's applied to fairly specific location estimation routines that few people use).

I'll try to address some of your other questions, but I'd suggest keeping this conversation in R-sig-geo as many others here have more experience to offer.

Cheers, Mike.


LOUZAO wrote:
Hello again Mike,

Could you send me a code example of the following function?

mkLookup {tripEstimation}

Thanks
matie louzao

------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG. Version: 8.0.101 / Virus Database: 270.4.1/1519 - Release Date: 6/25/2008 4:13 PM


_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to