R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("deldir-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('deldir') deldir 0.0-3 > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "deldir" > > ### * deldir > > flush(stderr()); flush(stdout()) > > ### Name: deldir > ### Title: Construct the Delaunay triangulation and the Dirichlet (or > ### Voronoi) tessellation of a planar point set. > ### Aliases: deldir > ### Keywords: spatial > > ### ** Examples > > x <- c(2.3,3.0,7.0,1.0,3.0,8.0) > y <- c(2.3,3.0,2.0,5.0,8.0,9.0) > try <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10)) > # Puts dummy points at the corners of the rectangular > # window, i.e. at (0,0), (10,0), (10,10), and (0,10) > ## Not run: > ##D try <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10),plot=TRUE,wl='tr') > ## End(Not run) > # Plots the triangulation which was created (but not the tesselation). > > > > cleanEx(); ..nameEx <- "plot.deldir" > > ### * plot.deldir > > flush(stderr()); flush(stdout()) > > ### Name: plot.deldir > ### Title: Produce a plot of the Delaunay triangulation and Dirichlet > ### (Voronoi) tesselation of a planar point set, as constructed by the > ### function deldir. > ### Aliases: plot.deldir > > > ### ** Examples > > ## Not run: > ##D try <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10)) > ##D plot(try) > ##D # > ##D deldir(x,y,list(ndx=4,ndy=4),plot=TRUE,add=TRUE,wl='te', > ##D col=c(1,1,2,3,4),num=TRUE) > ##D # Plots the tesselation, but does not save the results. > ##D try <- deldir(x,y,list(ndx=2,ndy=2),c(0,10,0,10),plot=TRUE,wl='tr', > ##D wp='n') > ##D # Plots the triangulation, but not the points, and saves the returned > ##D structure. > ## End(Not run) > > > > cleanEx(); ..nameEx <- "plot.tile.list" > > ### * plot.tile.list > > flush(stderr()); flush(stdout()) > > ### Name: plot.tile.list > ### Title: Plot Dirchlet/Voronoi tiles > ### Aliases: plot.tile.list > ### Keywords: hplot > > ### ** Examples > > x <- runif(20) > y <- runif(20) > z <- deldir(x,y,rw=c(0,1,0,1)) > w <- tile.list(z) > plot(w) Go? Go? Go? Go? cleanEx(); ..nameEx <- "tile.list" Go? Go? ### * tile.list Go? Go? flush(stderr()); flush(stdout()) Go? Go? ### Name: tile.list Go? ### Title: Create a list of tiles in a tessellation. Go? ### Aliases: tile.list Go? ### Keywords: spatial Go? Go? ### ** Examples Go? Go? x <- runif(20) Go? y <- runif(20) Go? z <- deldir(x,y) > w <- tile.list(z) > > z <- deldir(x,y,rw=c(0,1,0,1)) > w <- tile.list(z) > > z <- deldir(x,y,rw=c(0,1,0,1),dpl=list(ndx=2,ndy=2)) > w <- tile.list(z) > > > > > ### *