R/rtor.shift.S

Defines functions rtor.shift

Documented in rtor.shift

# Copyright Barry Rowlingson <b.rowlingson@lancaster.ac.uk> and 
# Peter Diggle (c) 1991-3; http://www.maths.lancs.ac.uk/~rowlings/Splancs/
# R port: copyright 1998-2000 by Roger S. Bivand

rtor.shift <- function(pts,rect)
{
	if(missing(rect))rect <- bboxx(bbox(pts))
	xsc <- max(rect[,1])-min(rect[,1])
	ysc <- max(rect[,2])-min(rect[,2])
	xsh <- runif(1)*xsc
	ysh <- runif(1)*ysc
	tor.shift(pts,xsh,ysh,rect)
}

Try the splancs package in your browser

Any scripts or data that you put into this service are public.

splancs documentation built on May 29, 2024, 6:22 a.m.