R/addpoints.S

Defines functions addpoints

Documented in addpoints

# 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

addpoints <- function(pts,plot=FALSE,quiet=FALSE)
{
	if(!plot & !missing(pts)){
		pointmap(pts)
	}

	if(missing(pts))pts <- NULL

	if(!quiet)cat("Use button 1 to enter new points - button 2 when finished.\n")
	newpts <- locator(type="p")
	pts <- rbind(pts,cbind(newpts$x,newpts$y))
	pts
}

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.