|
Dear R users, I wish to run spatial point pattern analysis (e.g. pair correlation function, mark correlation function) for which I need to create an observation window (window=owin) from which the spatial analysis is generated. The command I used to create this observation window as follows: X1<- ppp(x, y, window=owin(c(80.58,144.96),c(101.06,165.13)), unitname=c("metres","metres"), marks=dbh) I managed to create the observation window with this command. However, my data (x,y coordinates of objects in a square plot) didn't fit into this observation window's frame. It seems like I need to 'move or twist' my data by a certain angle so that they fit within the border of the observation window's frame. I'm not sure how to do that. Is there a command of function for that? I would be very grateful for any help or suggestions. I hope I described my problem so that it is understandable. Thank you, L. [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
|
On 16/03/12 23:02, Lucie V wrote:
> Dear R users, > > I wish to run spatial point pattern analysis (e.g. pair correlation function, mark correlation function) for which I need to create an observation window (window=owin) from which the spatial analysis is generated. The command I used to create this observation window as follows: > > X1<- ppp(x, y, window=owin(c(80.58,144.96),c(101.06,165.13)), unitname=c("metres","metres"), marks=dbh) Surely this should read unitname=c("metre","metres") i.e. singular then plural. > > I managed to create the observation window with this command. However, my data (x,y coordinates of objects in a square plot) didn't fit into this observation window's frame. It seems like I need to 'move or twist' my data by a certain angle so that they fit within the border of the observation window's frame. I'm not sure how to do that. Is there a command of function for that? I would be very grateful for any help or suggestions. > > I hope I described my problem so that it is understandable. Thank you, L. Why did you choose to use the window owin(c(80.58,144.96),c(101.06,165.13)) if that is not the window containing your points? In any analysis of spatial point patterns a window should be specified (a priori) and this window should consist of the region in which points were observed or looked for. Remember that there is information in *where the points aren't* as well as in where they *are*. You can't tell where points aren't unless you know where they've been looked for. So your analysis would appear to be on a shaky foundation from the start. That being said, it is very easy (though unsound and misleading) to construct a window containing all your points in an a posteriori fashion. Tools to do this include the functions ripras() and clickpoly(). Note that a window need *not* necessarily be a rectangle! There are also tools for adjusting and transforming existing windows. See affine(), rotate(), shift(), erosion(), dilation(), and expand.owin(). Transforming the observed points so that they fit into a given window makes no sense at all, as far as I can discern. cheers, Rolf Turner ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. |
| Powered by Nabble | Edit this page |
