Hi all, before I roll my own, naive implementation of a particular spatial point process, I thought I'd ask whether this has already been done. Specifically, I am looking for essentially the opposite of the Strauss and Mate'rn processes included in library(spatial) and documented in MASS. I am examining daily travel patterns, focusing on just the destinations of trips, not the movement itself. As people tend to go to the same places repeatedly, I think an appropriate spatial point process would be one which has a large probability of visiting the neighborhood of a prior point (but not the current point---this is a trip, after all), while at the same time having a non-zero probability of visiting a new point. Contrast this with the solid core/non-overlapping aspects of Strauss and SSI. Perhaps my process should be called SSA? Following the implementation of Strauss, I was going to parameterize the size of the points and the repeat/new probabilities, write a little C program, then see how the process K value compares to my collected data. A moderate-level search of R resources didn't turn up such a process already, and a Google search was equally useless (although this is perhaps due to my cluelessness regarding what to call this kind of process). Any pointers would be kindly appreciated, including "roll your own" and "read these refs." ---thanks in advance, James -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I don't know if it's what you really want, but some variant of the "Poisson cluster process" (where parents are randomly distributed in space and "offspring" points are scattered around them according to some distance distribution and in a random direction) might suit your purposes (try Diggle 1973). Ben On Tue, 7 May 2002, James Marca wrote:> Hi all, > > before I roll my own, naive implementation of a particular > spatial point process, I thought I'd ask whether this has > already been done. > > Specifically, I am looking for essentially the opposite of the > Strauss and Mate'rn processes included in library(spatial) and > documented in MASS. I am examining daily travel patterns, focusing > on just the destinations of trips, not the movement itself. As > people tend to go to the same places repeatedly, I think an > appropriate spatial point process would be one which has a > large probability of visiting the neighborhood of a prior point > (but not the current point---this is a trip, after all), while at > the same time having a non-zero probability of visiting a new point. > Contrast this with the solid core/non-overlapping aspects of Strauss > and SSI. Perhaps my process should be called SSA? > > Following the implementation of Strauss, I was going to parameterize > the size of the points and the repeat/new probabilities, write > a little C program, then see how the process K value compares to > my collected data. > > A moderate-level search of R resources didn't > turn up such a process already, and a Google search was equally > useless (although this is perhaps due to my cluelessness regarding > what to call this kind of process). > > Any pointers would be kindly appreciated, including "roll your > own" and "read these refs." > > ---thanks in advance, > James > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-- 318 Carr Hall bolker at zoo.ufl.edu Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker Box 118525 (ph) 352-392-5697 Gainesville, FL 32611-8525 (fax) 352-392-3704 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Maybe check the 'splancs' package? -roger _______________________________ UCLA Department of Statistics rpeng at stat.ucla.edu http://www.stat.ucla.edu/~rpeng On Tue, 7 May 2002, James Marca wrote:> Hi all, > > before I roll my own, naive implementation of a particular > spatial point process, I thought I'd ask whether this has > already been done. > > Specifically, I am looking for essentially the opposite of the > Strauss and Mate'rn processes included in library(spatial) and > documented in MASS. I am examining daily travel patterns, focusing > on just the destinations of trips, not the movement itself. As > people tend to go to the same places repeatedly, I think an > appropriate spatial point process would be one which has a > large probability of visiting the neighborhood of a prior point > (but not the current point---this is a trip, after all), while at > the same time having a non-zero probability of visiting a new point. > Contrast this with the solid core/non-overlapping aspects of Strauss > and SSI. Perhaps my process should be called SSA? > > Following the implementation of Strauss, I was going to parameterize > the size of the points and the repeat/new probabilities, write > a little C program, then see how the process K value compares to > my collected data. > > A moderate-level search of R resources didn't > turn up such a process already, and a Google search was equally > useless (although this is perhaps due to my cluelessness regarding > what to call this kind of process). > > Any pointers would be kindly appreciated, including "roll your > own" and "read these refs." > > ---thanks in advance, > James > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Following a suggestion by Rolf Turner, I looked in the spatstat package and found that the function rNeymanScott will probably do what I need, as will rThomas and rMatClust. I especially like the fact that rNeymanScott provides a hook for a callback clustering function. This seems extremely flexible and far more general that any hack I would have come up with. Thanks for the replies. James -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
ken_lee
2002-May-08 02:33 UTC
[R] Problem about trim the space and add space to force the same nchar
Dear all, First, Can I trim the space like a<-"abc " ==> a<- "abc" or a<-"a b c " ==> a<-"a b c" Second, Can I generate a vector has the same length (nchar) like a<-c("mean =10 ", "std =1.23", "... Best regards Ken -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._