If the pivoted portion and the previous section can be viewed as sets of line segments, there is a function in one of the spatial packages that tests for intersections between sets of line segments.
crossing.psp() in spatstat if I remember correctly. -Don At 10:26 AM -0800 11/19/06, sethlatimer wrote: >I am trying to implement the so called pivot algorithm for a markov chain >monte carlo simulation of self avoiding random walks. There must be a >simple method of checking to see if the pivoted portion of the random walk >intersects with the previous section? > >In other words I have a list of adjacent coordinates divided into two parts. >I apply an orthogonal transformation to one part and I need to check if it >intersects with the other part before accepting the transformation. I am >able to do it with a messy nest of loops but there must be a more elegant >solution that I am missing. > >Thanks >Seth Latimer >-- >View this message in context: >http://www.nabble.com/matching-coordinates-tf2664904.html#a7431888 >Sent from the R help mailing list archive at Nabble.com. > >______________________________________________ >R-help@stat.math.ethz.ch 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. -- --------------------------------- Don MacQueen Lawrence Livermore National Laboratory Livermore, CA, USA ______________________________________________ R-help@stat.math.ethz.ch 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.