Hi, I have the coordinates of 3D points and I want to plot the pair correlation function of these points (https://en.wikipedia.org/wiki/Radial_distribution_function). I wonder if it possible to calculate this function with R. Maybe with the spatstat library? I tried but I found the way to do this with 3D points but not for 3D points. Could you help me ? Thank you, Best regards, --
I haven't attempted this. (Mainly because I'm not familiar with the theory surrounding it). However, I looked at the documentation for the spatstat package. There are are several functions prefixed with pcf, including one named pcf3est. According to its description field: Estimates the pair correlation function from a three-dimensional point pattern. *If* it does what it claims, would that solve your problem? Note (to spatstat authors): I'm not convinced this package is well documented. In fact, I'm not even convinced it meets CRAN standards, which require functions to have their arguments documented. X Three-dimensional point pattern (object of class "pp3"). Nowhere in the help page, does it say what a pp3 object is, or how to create it, or where to find that information. Potentially requiring a user to search through a 1766 page document for the answer. (Yes, I know there's a function named pp3, but I don't think that's good enough). If people are not going to document their packages properly, they could try a little bit harder to answer R-help questions that involve their packages... On Tue, Apr 28, 2020 at 3:56 AM Labo Eric <leroy at icmpe.cnrs.fr> wrote:> > Hi, > > I have the coordinates of 3D points and I want to plot the pair > correlation function of these points > (https://en.wikipedia.org/wiki/Radial_distribution_function). I wonder > if it possible to calculate this function with R. Maybe with the > spatstat library? I tried but I found the way to do this with 3D points > but not for 3D points. > > Could you help me ? > > Thank you, > > Best regards, > > -- > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
Technically, per the Posting Guide, help for contributed packages is supposed to come through different channel(s) than R-help as indicated in their DESCRIPTION file (typically searchable thru the package CRAN page). In practice this rule tends to only get invoked when the OT traffic gets too high, but it may be a bit much to expect maintainers to patrol R-help permanently. Feel free to direct OT questions toward the relevant CRAN page or the resources mentioned there. On April 28, 2020 3:07:39 PM PDT, Abby Spurdle <spurdle.a at gmail.com> wrote:>I haven't attempted this. >(Mainly because I'm not familiar with the theory surrounding it). > >However, I looked at the documentation for the spatstat package. >There are are several functions prefixed with pcf, including one named >pcf3est. >According to its description field: > > Estimates the pair correlation function > from a three-dimensional point pattern. > >*If* it does what it claims, would that solve your problem? > >Note (to spatstat authors): > >I'm not convinced this package is well documented. >In fact, I'm not even convinced it meets CRAN standards, which require >functions to have their arguments documented. > > X > Three-dimensional point pattern (object of class "pp3"). > >Nowhere in the help page, does it say what a pp3 object is, or how to >create it, or where to find that information. >Potentially requiring a user to search through a 1766 page document >for the answer. >(Yes, I know there's a function named pp3, but I don't think that's >good enough). > >If people are not going to document their packages properly, they >could try a little bit harder to answer R-help questions that involve >their packages... > > >On Tue, Apr 28, 2020 at 3:56 AM Labo Eric <leroy at icmpe.cnrs.fr> wrote: >> >> Hi, >> >> I have the coordinates of 3D points and I want to plot the pair >> correlation function of these points >> (https://en.wikipedia.org/wiki/Radial_distribution_function). I >wonder >> if it possible to calculate this function with R. Maybe with the >> spatstat library? I tried but I found the way to do this with 3D >points >> but not for 3D points. >> >> Could you help me ? >> >> Thank you, >> >> Best regards, >> >> -- >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. > >______________________________________________ >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >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.-- Sent from my phone. Please excuse my brevity.
On 29/04/20 10:07 am, Abby Spurdle wrote:> I haven't attempted this. > (Mainly because I'm not familiar with the theory surrounding it). > > However, I looked at the documentation for the spatstat package. > There are are several functions prefixed with pcf, including one named pcf3est. > According to its description field: > > Estimates the pair correlation function > from a three-dimensional point pattern. > > *If* it does what it claims ...Why would you doubt that it does what it claims?> ... would that solve your problem? > > Note (to spatstat authors): > > I'm not convinced this package is well documented. > In fact, I'm not even convinced it meets CRAN standards, which require > functions to have their arguments documented. > > X > Three-dimensional point pattern (object of class "pp3"). > > Nowhere in the help page, does it say what a pp3 object is, or how to > create it, or where to find that information. > Potentially requiring a user to search through a 1766 page document > for the answer. > (Yes, I know there's a function named pp3, but I don't think that's > good enough). > > If people are not going to document their packages properly, they > could try a little bit harder to answer R-help questions that involve > their packages...<SNIP> Wouldn't the first thing that one would try be: ??"pp3" The required information is then immediately apparent. Moreover if one takes the trouble to look at the examples, one is led to the function rpoispp3() which points to the function pp3(). This reminds not a little of fortunes::fortune(9). Of course I'm biased, but IMHO spatstat is documented not only "properly", but superbly well! :-) cheers, Rolf -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276