Hi,

I've got this experimental function "gridppp".

You have to especify the required "lag" of the 
grid (i.e. the desired length of the x-side or 
the y-side of each cell in the grid).
It gives you a list of point patterns of the required size.


Example of use:

data (lansing)
plot(lansing)
axis(1)
axis(2)

cosa <- gridppp(lansing, xlag=0.2)

plot(cosa[[1]], col="red", add=T)


I hope this helps you,


Marcelino




###### Here is the function:   ####################################


gridppp= function (mippp,xlag,ylag=xlag){

    xrange <- mippp$w$xrange
    yrange <- mippp$w$yrange

    x0 <- xrange[1]
    y0 <- yrange[1]

    maxx <- round(diff(xrange)/xlag)
    maxy <- round(diff(yrange)/ylag)

    result <- NULL
    z <- 0
    for (i in 1:maxx){
       for (j in 1:maxy){
         z=z+1
         result[z]=list(mippp[owin(c((x0+xlag)*(i-1), 
(x0+xlag)*i),c((y0+ylag)*(j-1), (y0+ylag)*j))])
       }
    }

    class(result) <- c("gridedppp", class(result))
    return(result)
}

#########################################################################



At 22:24 15/04/2008, Honey Giroday wrote:

>Hi,
>
>I am currently using R 2.5.1 on a linux
>operating system (I am connected to the linux system via remote desktop
>connection).   I am trying to estimate nuiscance 
>parameters for a Geyer model that will be fit to 
>a spatial point process dataset with ~10,000 
>points.  However, R reaches its vector 
>allocation limit with the parameter ranges I 
>have specified.  As a result, I will try 
>estimate the parameters by subsetting the ppp 
>dataset based on a grid of approximately 50x50km 
>squares.  I understand how to subset ppp but I 
>would like to find a simple way of producing my 
>grid (or owins).  Can anyone suggest a 
>command/have a section of code that would do 
>this for me?  Thank you for your assistance with this issue and for your time.
>
>Sincerely,
>
>
>
>
>
>Honey-Marie Giroday, M.Sc. Candidate, A.Ag., B.I.T.
>University of Northern British Columbia
>
>
>_________________________________________________________________
>Find hidden words, unscramble celebrity names, 
>or try the ultimate crossword puzzle with Live Search Games. Play now!
>http://g.msn.ca/ca55/212
>         [[alternative HTML version deleted]]
>
>_______________________________________________
>R-sig-Geo mailing list
>R-sig-Geo@stat.math.ethz.ch
>https://stat.ethz.ch/mailman/listinfo/r-sig-geo

________________________________

Marcelino de la Cruz Rot

Departamento de  Biología Vegetal
E.U.T.I. Agrícola
Universidad Politécnica de Madrid
28040-Madrid
Tel.: 91 336 54 35
Fax: 91 336 56 56
marcelino.delacruz@upm.es
_________________________________
	[[alternative HTML version deleted]]


