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("PBSmapping-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('PBSmapping') PBS Mapping 2.03 Copyright (C) 2003, 2004, 2005 Fisheries and Oceans Canada PBS Mapping comes with ABSOLUTELY NO WARRANTY; for details see the file COPYING. This is free software, and you are welcome to redistribute it under certain conditions, as outlined in the above file. Usage notes: In R, the data sets are not immediately available; they must be loaded with R's `data' function. Type `?data' for further information on this function. This package includes several demos. Type `?demo' for further information. The library's `demo' folder contains their source code. > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "addLabels" > > ### * addLabels > > flush(stderr()); flush(stdout()) > > ### Name: addLabels > ### Title: Add Labels to an Existing Plot > ### Aliases: addLabels > ### Keywords: aplot > > ### ** Examples > > #--- create sample PolyData to label Vancouver Island > labelData <- data.frame(PID=33, label="Vancouver Island"); > #--- load data > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- plot the map > plotMap (nepacLL, xlim=c(-129, -122.6), ylim=c(48, 51.1)) Warning in par(args) : gamma cannot be modified on this device > #--- add the labels > addLabels (labelData, placement="CENTROID", polys=nepacLL, col=2) > > > > cleanEx(); ..nameEx <- "addLines" > > ### * addLines > > flush(stderr()); flush(stdout()) > > ### Name: addLines > ### Title: Add a PolySet to an Existing Plot as Polylines > ### Aliases: addLines > ### Keywords: aplot > > ### ** Examples > > #--- create a PolySet to plot > polys <- data.frame(PID=rep(1, 4), POS=1:4, X=c(0, 1, 1, 0), Y=c(0, 0, 1, 1)) > polys <- as.PolySet(polys, projection=1) > #--- plot the PolySet > plotLines(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5), projection=1) Warning in par(args) : gamma cannot be modified on this device > #--- add the PolySet to the plot (in a different style) > addLines(polys, lwd=5, col=3) > > > > cleanEx(); ..nameEx <- "addPoints" > > ### * addPoints > > flush(stderr()); flush(stdout()) > > ### Name: addPoints > ### Title: Add EventData/PolyData to an Existing Plot as Points > ### Aliases: addPoints > ### Keywords: aplot > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) { + data(nepacLL) + data(surveyData) + } > #--- plot a map > plotMap(nepacLL, xlim=c(-136, -125), ylim=c(48, 57)) Warning in par(args) : gamma cannot be modified on this device > #--- add events > addPoints(surveyData, col=1:7) > > > > cleanEx(); ..nameEx <- "addPolys" > > ### * addPolys > > flush(stderr()); flush(stdout()) > > ### Name: addPolys > ### Title: Add a PolySet to an Existing Plot as Polygons > ### Aliases: addPolys > ### Keywords: aplot > > ### ** Examples > > #--- create a PolySet to plot > polys <- data.frame(PID=rep(1, 4), POS=1:4, X=c(0, 1, 1, 0), Y=c(0, 0, 1, 1)) > polys <- as.PolySet(polys, projection=1) > #--- plot the PolySet > plotPolys(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5), density=0, projection=1) Warning in par(args) : gamma cannot be modified on this device > #--- add the PolySet to the plot (in a different style) > addPolys(polys, col=3) > > > > cleanEx(); ..nameEx <- "addStipples" > > ### * addStipples > > flush(stderr()); flush(stdout()) > > ### Name: addStipples > ### Title: Add Stipples to an Existing Plot > ### Aliases: addStipples > ### Keywords: aplot > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) { + data(nepacLL) + } > #--- plot a map > plotMap(nepacLL, xlim=c(-128.66, -122.83), ylim=c(48.00, 51.16)) Warning in par(args) : gamma cannot be modified on this device > #--- add stippling > addStipples(nepacLL, col=2, pch=19, cex=0.25) > > > > cleanEx(); ..nameEx <- "appendPolys" > > ### * appendPolys > > flush(stderr()); flush(stdout()) > > ### Name: appendPolys > ### Title: Append a Two-Column Matrix to a PolySet > ### Aliases: appendPolys > ### Keywords: manip > > ### ** Examples > > #--- create two simple matrices > a <- matrix(data=c(0, 0, 1, 0, 1, 1, 0, 1), ncol=2, byrow = TRUE); > b <- matrix(data=c(2, 2, 3, 2, 3, 3, 2, 3), ncol=2, byrow = TRUE); > #--- build a PolySet from them > polys <- appendPolys(NULL, a); > polys <- appendPolys(polys, b); > #--- print the result > print (polys); PID POS X Y 1 1 1 0 0 2 1 2 1 0 3 1 3 1 1 4 1 4 0 1 11 2 1 2 2 21 2 2 3 2 31 2 3 3 3 41 2 4 2 3 > > > > cleanEx(); ..nameEx <- "calcArea" > > ### * calcArea > > flush(stderr()); flush(stdout()) > > ### Name: calcArea > ### Title: Calculate the Areas of Polygons > ### Aliases: calcArea > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- convert LL to UTM so calculation makes sense > attr(nepacLL, "zone") <- 9 > nepacUTM <- convUL(nepacLL) > #--- calculate and print the areas > print(calcArea(nepacUTM)) PID area 1 0 5.573727e+05 2 1 6.301040e+06 3 15 8.967817e+04 4 33 3.207199e+04 5 39 6.813295e+03 6 47 9.310096e+03 7 60 1.006881e+04 8 67 1.041738e+04 9 68 4.230791e+03 10 74 5.406466e+03 11 88 4.375378e+03 12 89 1.997027e+03 13 109 3.235801e+03 14 133 1.967931e+03 15 148 2.667595e+03 16 155 2.833461e+03 17 158 2.977181e+03 18 173 4.666762e+03 19 178 1.322215e+03 20 192 8.303506e+03 21 225 1.485227e+03 22 228 6.858361e+02 23 263 1.037469e+03 24 272 5.388976e+03 25 281 9.365742e+02 26 291 9.032443e+02 27 295 3.021943e+02 28 346 2.121592e+03 29 374 5.433569e+02 30 383 3.395916e+02 31 388 4.661451e+03 32 389 5.651427e+02 33 393 4.903157e+02 34 396 8.575188e+02 35 439 2.211737e+02 36 452 1.259028e+03 37 479 2.410201e+03 38 500 3.903435e+02 39 526 4.749828e+02 40 542 6.741855e+02 41 544 8.426080e+02 42 553 4.474394e+02 43 554 4.960589e+02 44 586 1.685397e+02 45 598 4.166700e+02 46 616 1.506454e+02 47 622 4.762878e+02 48 624 2.226566e+02 49 625 3.388390e+02 50 635 4.474270e+02 51 650 3.872422e+02 52 698 5.377856e+02 53 709 3.577111e+02 54 723 4.565769e+02 55 726 3.995011e+02 56 832 2.836394e+02 57 851 5.524841e+02 58 881 1.795174e+02 59 890 1.496283e+02 60 894 1.226854e+02 61 897 4.149534e+02 62 915 1.415755e+02 63 930 1.824920e+02 64 936 5.569462e+02 65 940 1.908063e+02 66 953 1.863565e+02 67 970 1.122725e+02 68 984 1.749215e+02 69 996 3.363487e+02 70 1036 1.485851e+02 71 1049 2.537301e+02 72 1071 8.275883e+01 73 1082 1.362024e+02 74 1085 8.968755e+01 75 1089 1.403620e+02 76 1102 1.925248e+02 77 1148 2.838531e+02 78 1163 3.840838e+02 79 1170 4.833102e+02 80 1217 1.624011e+02 81 1249 1.564437e+02 82 1261 1.923765e+02 83 1270 1.424750e+02 84 1298 1.549612e+02 85 1314 1.139296e+02 86 1331 3.174355e+02 87 1342 1.245477e+02 88 1349 8.127303e+01 89 1367 2.441102e+02 90 1376 3.651836e+02 91 1433 1.592570e+02 92 1460 9.369739e+01 93 1476 1.404767e+02 94 1511 1.209479e+02 95 1532 1.787298e+02 96 1534 1.571817e+02 97 1536 3.828752e+02 98 1550 2.001222e+02 99 1575 1.531840e+02 100 1577 1.711572e+02 101 1590 4.736291e+01 102 1603 4.405740e+01 103 1607 1.815271e+02 104 1626 1.591694e+02 105 1629 4.916482e+01 106 1682 7.835385e+01 107 1687 1.917776e+02 108 1749 3.071790e+02 109 1751 2.171240e+02 110 1773 7.963493e+01 111 1782 2.777705e+01 112 1791 6.986707e+01 113 1803 1.839925e+02 114 1829 2.285071e+02 115 1846 6.280717e+01 116 1853 1.097426e+02 117 1859 1.054290e+02 118 1885 2.000010e+02 119 1964 1.638817e+02 120 1984 4.279910e+01 121 2005 7.729411e+01 122 2017 1.226769e+02 123 2044 4.545399e+01 124 2052 6.744490e+01 125 2065 7.152857e+01 126 2092 1.266198e+02 127 2093 5.970750e+01 128 2094 6.987048e+01 129 2095 4.412542e+01 130 2099 9.266526e+01 131 2135 3.787117e+01 132 2172 6.978212e+01 133 2202 1.874417e+02 134 2204 7.572955e+01 135 2230 7.282363e+01 136 2253 2.778974e+02 137 2269 1.040963e+02 138 2271 5.205243e+01 139 2285 7.658337e+01 140 2286 1.105630e+02 141 2309 2.973189e+02 142 2322 9.705925e+01 143 2355 6.316060e+01 144 2362 5.064910e+01 145 2370 1.092932e+02 146 2396 1.021360e+02 147 2427 1.268747e+02 148 2458 9.903671e+01 149 2494 9.829062e+01 150 2559 1.317582e+02 151 2565 9.561762e+01 152 2575 2.572609e+02 153 2587 2.110240e+02 154 2594 8.561927e+01 155 2626 2.851912e+01 156 2628 4.009187e+01 157 2645 2.030550e+02 158 2686 3.717576e+01 159 2712 7.977313e+01 160 2760 2.174526e+01 161 2763 9.858038e+01 162 2769 3.420446e+02 163 2781 7.688565e+01 164 2816 9.043782e+01 165 2867 8.964921e+01 166 2926 7.670971e+01 167 2936 5.676076e+01 168 2947 8.488249e+01 169 2955 6.723336e+01 170 3041 6.069673e+01 171 3057 3.668804e+01 172 3077 2.853200e+02 173 3103 5.681367e+01 174 3126 5.076195e+01 175 3153 3.398748e+01 176 3159 7.535477e+01 177 3162 8.599320e+01 178 3251 2.137715e+01 179 3278 3.407684e+01 180 3300 1.676900e+02 181 3326 6.700246e+01 182 3342 1.807091e+01 183 3348 4.329596e+01 184 3370 4.989049e+01 185 3414 2.123486e+02 186 3418 1.183398e+02 187 3419 8.149316e+01 188 3445 6.436054e+01 189 3451 2.479518e+01 190 3483 3.768581e+01 191 3488 3.952216e+01 192 3496 2.602850e+01 193 3522 3.071034e+01 194 3528 2.932826e+01 195 3542 1.082977e+02 196 3547 3.765108e+01 197 3549 6.553802e+01 198 3571 1.054384e+01 199 3615 8.057104e+01 200 3667 1.414317e+01 201 3677 5.015344e+01 202 3754 5.692244e+01 203 3764 2.337577e+01 204 3841 2.346858e+01 205 3854 7.811432e+01 206 3858 1.545655e+01 207 3894 2.947478e+01 208 3903 5.071624e+01 209 3939 2.691566e+01 210 3958 5.359821e+01 211 3992 5.208865e+01 212 4016 1.733707e+01 213 4018 4.332036e+01 214 4033 9.364617e+01 215 4035 5.866672e+01 216 4069 1.173080e+01 217 4118 2.160675e+01 218 4157 8.368041e+01 219 4176 4.633616e+01 220 4210 2.122499e+01 221 4232 5.070661e+01 222 4245 1.325686e+02 223 4260 2.249238e+01 224 4268 2.348971e+01 225 4302 8.764755e+01 226 4314 2.021786e+01 227 4315 3.396201e+01 228 4322 2.564512e+01 229 4334 1.400753e+01 230 4358 5.985750e+01 231 4369 7.097417e+01 232 4384 3.256946e+01 233 4387 3.925601e+01 234 4388 1.023826e+02 235 4402 2.637331e+01 236 4415 2.399074e+01 237 4438 3.168548e+01 238 4471 1.773073e+01 239 4529 1.500547e+01 240 4560 9.356257e+00 241 4592 3.765594e+01 242 4594 1.298237e+01 243 4603 1.512793e+01 244 4640 4.413049e+01 245 4657 3.517173e+01 246 4662 3.256085e+01 247 4672 5.305590e+01 248 4706 9.152212e+00 249 4725 3.546733e+01 250 4738 1.375870e+01 251 4750 3.647468e+00 252 4777 3.042493e+01 253 4789 1.039467e+01 254 4852 1.055828e+02 255 4905 4.204229e+01 256 4934 3.541225e+01 257 4945 1.332858e+01 258 5004 3.920275e+01 259 5022 3.036120e+01 260 5030 3.750400e+01 261 5055 1.727187e+01 262 5056 3.587605e+01 263 5109 5.012975e+01 264 5112 1.638580e+01 265 5117 7.654456e+00 266 5118 3.685286e+01 267 5147 1.637419e+01 268 5161 1.940768e+01 269 5162 1.891298e+01 270 5166 3.187476e+01 271 5191 1.969237e+01 272 5197 2.507361e+01 273 5267 1.380152e+01 274 5387 1.408575e+01 275 5427 1.716181e+01 276 5478 2.048584e+01 277 5480 6.687883e+01 278 5504 5.008909e+01 279 5516 8.875870e+01 280 5520 2.237434e+01 281 5537 4.558811e+01 282 5540 3.251117e+01 283 5553 1.784914e+01 284 5564 9.159484e+00 285 5571 3.597880e+01 286 5629 4.706125e+01 287 5638 1.353627e+01 288 5673 1.836519e+01 289 5682 6.039797e+01 290 5715 3.108254e+01 291 5719 3.864346e+01 292 5733 4.022504e+01 293 5771 2.092478e+01 294 5833 1.196104e+01 295 5859 2.920523e+01 296 5930 4.839955e+01 297 5955 2.064283e+01 298 6000 1.449399e+01 299 6004 4.729420e+00 300 6060 3.597956e+01 301 6090 3.794879e+01 302 6096 2.294377e+01 303 6137 2.234694e+01 304 6149 1.355430e+01 305 6167 3.696357e+00 306 6170 1.261718e+01 307 6182 4.650630e+01 308 6220 2.537647e+01 309 6229 1.470318e+01 310 6233 1.210021e+01 311 6242 1.146248e+01 312 6268 4.611147e+01 313 6316 5.214447e+00 314 6340 7.525885e+00 315 6353 2.709787e+00 316 6403 6.020067e+00 317 6414 2.311638e+01 318 6417 5.544814e+00 319 6434 7.137794e+00 320 6437 1.658738e+01 321 6471 2.382706e+01 322 6482 2.844946e+01 323 6483 2.610680e+01 324 6523 2.022182e+01 325 6555 1.674935e+01 326 6556 2.753669e+01 327 6559 5.371147e+01 328 6560 3.367618e+00 329 6573 3.591698e+01 330 6607 4.889321e+01 331 6656 1.074777e+01 332 6674 3.134809e+01 333 6712 2.964594e+00 334 6719 6.590570e+00 335 6725 5.552199e+00 336 6737 9.993017e+00 337 6762 1.271361e+01 338 6787 2.175327e+01 339 6820 2.454319e+01 340 6839 8.986991e+00 341 6869 1.793832e+01 342 6884 3.275530e+00 343 6892 9.342545e+00 344 6895 3.565661e+01 345 6909 8.637854e+00 346 6918 6.076825e+01 347 6919 1.239283e+01 348 6945 8.953209e+00 349 7003 4.510211e+00 350 7006 3.402558e+01 351 7033 1.273590e+01 352 7074 2.141286e+01 353 7081 4.673218e+00 354 7083 2.170620e+01 355 7107 2.087998e+01 356 7112 2.247977e+01 357 7134 4.841875e+00 358 7142 7.389280e+00 359 7143 2.666827e+01 360 7150 5.038168e+01 361 7161 1.594330e+01 362 7174 1.931342e+01 363 7181 6.583077e+00 364 7217 1.796230e+01 365 7219 1.775025e+01 366 7226 3.466178e+00 367 7285 9.207988e+00 368 7350 7.422619e+00 369 7359 5.345577e+00 370 7364 4.904453e+00 371 7518 1.627198e+01 372 7532 1.199275e+01 373 7533 4.547692e+00 374 7555 3.500904e+01 375 7559 4.439626e+00 376 7578 7.855140e+00 377 7580 1.537421e+01 378 7582 8.566676e+00 379 7598 2.072215e+01 380 7657 7.786477e+00 381 7790 2.273848e+01 382 7793 2.209738e+01 383 7817 6.851776e+00 384 7830 5.767856e+00 385 7863 7.063842e+00 386 7902 1.239980e+01 387 7927 8.051613e+00 388 7970 1.371439e+01 389 7973 2.760540e+01 390 8015 2.434068e+01 391 8022 6.853770e+00 392 8052 1.737990e+01 393 8055 6.204130e+00 394 8065 1.505781e+00 395 8071 1.422834e+01 396 8096 6.082806e+00 397 8143 5.673454e+00 398 8160 8.600284e+00 399 8161 9.523629e+00 400 8220 1.401231e+01 401 8248 9.298005e+00 402 8253 8.416372e+00 403 8271 1.821422e+01 404 8279 5.830789e+00 405 8390 1.738327e+01 406 8396 3.729060e+01 407 8400 9.152772e+00 408 8484 1.086278e+01 409 8505 2.199285e+01 410 8560 2.004242e+01 411 8564 6.335791e+00 412 8585 7.764488e+00 413 8659 1.741078e+00 414 8678 6.152182e+00 415 8684 1.115119e+01 416 8701 5.795181e+00 417 8706 4.273887e+00 418 8776 1.092480e+01 419 8778 6.424703e+00 420 8781 1.186261e+01 421 8838 5.008922e+00 422 8840 2.046337e+01 423 8848 8.749792e+00 424 8892 1.214676e+01 425 8895 1.163264e+01 426 8919 7.858256e+00 427 8955 8.841912e+00 428 8999 8.593514e+00 429 9013 1.166398e+01 430 9015 6.454022e+00 431 9042 7.715623e+00 432 9053 5.985975e+00 433 9054 5.733120e+00 434 9058 9.379944e+00 435 9066 9.337652e+00 436 9076 5.107762e+01 437 9148 1.799664e+01 438 9156 4.517528e+01 439 9180 6.000053e+00 440 9182 3.358167e+00 441 9308 1.773590e+01 442 9362 4.474669e+00 443 9382 3.557739e+00 444 9406 1.851024e+01 445 9412 7.478844e+00 446 9421 7.345072e+00 447 9435 7.389926e+00 448 9460 1.250764e+01 449 9477 3.013513e+00 450 9506 1.312834e+01 451 9510 1.130259e+01 452 9529 2.678464e+00 453 9545 2.614371e+00 454 9572 3.300488e+00 455 9592 7.865072e+00 456 9674 1.886649e+01 457 9686 6.397673e+00 458 9712 7.196683e+00 459 9761 1.277113e+01 460 9819 8.127139e+00 461 9826 1.077145e+01 462 9840 9.154395e+00 463 9842 5.961403e+00 464 9850 1.522434e+01 465 9872 1.303883e+01 466 9876 1.737348e+00 467 9906 2.532458e+01 468 9930 7.792550e+00 469 9934 4.946603e+00 470 9937 1.830971e+00 471 9986 8.425664e+00 472 9991 6.239483e+00 473 10045 3.697116e+01 474 10061 1.268446e+01 475 10066 1.922198e+01 476 10080 4.132393e+00 477 10096 2.328532e+01 478 10183 7.403357e+00 479 10234 4.266437e+00 480 10259 2.279781e+00 481 10277 1.036616e+01 482 10309 2.569476e+00 483 10316 9.055330e+00 484 10348 1.173494e+01 485 10369 3.756343e+00 486 10378 4.513596e+00 487 10382 1.780028e+01 488 10412 3.749776e+00 489 10467 2.846732e+00 490 10468 1.161703e+01 491 10524 3.213452e+01 492 10540 1.130384e+01 493 10547 1.232672e+01 494 10571 6.593217e+00 495 10575 1.971336e+00 496 10578 4.814698e+00 497 10595 5.382098e+00 498 10604 3.991599e+00 499 10613 2.908991e+00 500 10638 1.129675e+01 501 10652 8.624435e+00 502 10685 6.329487e+00 503 10695 3.969224e+00 504 10714 4.138440e+01 505 10716 8.698839e+00 506 10726 6.792913e+00 507 10750 6.330064e+00 508 10785 5.784947e+00 509 10801 2.378668e+00 510 10858 2.026852e+01 511 10867 1.024763e+01 512 10869 4.457324e+00 513 10886 7.042877e+00 514 10892 3.779771e+00 515 10901 1.331119e+01 516 10982 1.489336e+01 517 11036 8.183240e+00 518 11075 6.967189e+00 519 11080 2.812536e+00 520 11119 3.978729e+00 521 11126 1.281243e+01 522 11130 1.269780e+01 523 11132 7.770642e+00 524 11186 3.501740e+00 525 11195 2.552294e+00 526 11196 4.267328e+00 527 11238 1.934489e+01 528 11253 7.510280e+00 529 11293 7.667654e+00 530 11309 2.873448e+00 531 11310 1.844527e+00 532 11311 2.973801e+00 533 11324 2.766032e+00 534 11337 1.292228e+00 535 11340 4.712085e+00 536 11344 2.771614e+01 > > > > cleanEx(); ..nameEx <- "calcCentroid" > > ### * calcCentroid > > flush(stderr()); flush(stdout()) > > ### Name: calcCentroid > ### Title: Calculate the Centroids of Polygons > ### Aliases: calcCentroid > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- calculate and print the centroids for several polygons > print(calcCentroid(nepacLL[is.element(nepacLL$PID, c(33, 39, 47)), ])) PID X Y 1 33 -125.7302 49.64381 2 39 -132.7354 55.52470 3 47 -132.2675 53.44296 > > > > cleanEx(); ..nameEx <- "calcConvexHull" > > ### * calcConvexHull > > flush(stderr()); flush(stdout()) > > ### Name: calcConvexHull > ### Title: Calculate the Convex Hull for a Set of Points > ### Aliases: calcConvexHull > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(surveyData) > #--- plot the convex hull, and then plot the points > plotMap(calcConvexHull(surveyData)) Warning in par(args) : gamma cannot be modified on this device > addPoints(surveyData); > > > > cleanEx(); ..nameEx <- "calcLength" > > ### * calcLength > > flush(stderr()); flush(stdout()) > > ### Name: calcLength > ### Title: Calculate the Length of Polylines > ### Aliases: calcLength > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- calculate the perimeter of Vancouver Island > print(calcLength(nepacLL[nepacLL$PID == 33, ])) PID length 1 33 2867.049 > > > > cleanEx(); ..nameEx <- "calcMidRange" > > ### * calcMidRange > > flush(stderr()); flush(stdout()) > > ### Name: calcMidRange > ### Title: Calculate the Midpoint of the X/Y Ranges of Polygons > ### Aliases: calcMidRange > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- calculate and print the centroids for several polygons > print(calcMidRange(nepacLL[is.element(nepacLL$PID, c(33, 39, 47)), ])) PID X Y 1 33 -125.8497 49.59222 2 39 -132.8103 55.52493 3 47 -132.0799 53.15103 > > > > cleanEx(); ..nameEx <- "calcSummary" > > ### * calcSummary > > flush(stderr()); flush(stdout()) > > ### Name: calcSummary > ### Title: Apply Functions to Polygons in a PolySet > ### Aliases: calcSummary > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- calculate and print the centroids for several polygons > print(calcSummary(nepacLL[is.element(nepacLL$PID, c(33, 39, 47)), ], + rollup = 3, FUN = mean)) PID X Y 1 33 -125.9299 49.55981 2 39 -132.6517 55.43013 3 47 -132.1942 53.16776 > > > > cleanEx(); ..nameEx <- "clipLines" > > ### * clipLines > > flush(stderr()); flush(stdout()) > > ### Name: clipLines > ### Title: Clip a PolySet as Polylines > ### Aliases: clipLines > ### Keywords: manip > > ### ** Examples > > #--- create a triangle to clip > polys <- data.frame(PID=rep(1, 3), POS=1:3, X=c(0,1,0), Y=c(0,0.5,1)) > #--- clip the triangle in the X direction, and plot the results > plotLines(clipLines(polys, xlim=c(0,.75), ylim=range(polys[, "Y"]))) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "clipPolys" > > ### * clipPolys > > flush(stderr()); flush(stdout()) > > ### Name: clipPolys > ### Title: Clip a PolySet as Polygons > ### Aliases: clipPolys > ### Keywords: manip > > ### ** Examples > > #--- create a triangle that will be clipped > polys <- data.frame(PID=rep(1, 3), POS=1:3, X=c(0,1,.5), Y=c(0,0,1)) > #--- clip the triangle in the X direction, and plot the results > plotPolys(clipPolys(polys, xlim=c(0,.75), ylim=range(polys[, "Y"])), + col=2); Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "closePolys" > > ### * closePolys > > flush(stderr()); flush(stdout()) > > ### Name: closePolys > ### Title: Close a PolySet > ### Aliases: closePolys > ### Keywords: manip > > ### ** Examples > > #--- 4 corners > polys <- data.frame(PID=c(1, 1, 2, 2, 3, 3, 4, 4), + POS=c(1, 2, 1, 2, 1, 2, 1, 2), + X = c(0, 1, 2, 3, 0, 1, 2, 3), + Y = c(1, 0, 0, 1, 2, 3, 3, 2)) > plotPolys(closePolys(polys), col=2) Warning in par(args) : gamma cannot be modified on this device > > #--- 2 corners and 1 opposite > polys <- data.frame(PID=c(1, 1, 2, 2, 3, 3, 3), + POS=c(1, 2, 1, 2, 1, 2, 3), + X = c(0, 1, 0, 1, 5, 6, 1.5), + Y = c(1, 0, 2, 3, 0, 1.5, 3)) > plotPolys(closePolys(polys), col=2) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "combineEvents" > > ### * combineEvents > > flush(stderr()); flush(stdout()) > > ### Name: combineEvents > ### Title: Combine Measurements of Events > ### Aliases: combineEvents > ### Keywords: manip > > ### ** Examples > > #--- create an EventData data frame: let each event have Z = 1 > events <- data.frame(EID=1:10, X=1:10, Y=1:10, Z=rep(1, 10)) > #--- example output from findPolys where 1 event occurred in the first > #--- polygon, 3 in the second, and 6 in the third > locs <- data.frame(EID=1:10, PID=c(rep(1, 1), rep(2, 3), rep(3, 6)), + Bdry=rep(0, 10)) > #--- sum the Z column of the events in each polygon, and print the result > print(combineEvents(events=events, locs=locs, FUN=sum)) PID Z 1 1 1 2 2 3 3 3 6 > > > > cleanEx(); ..nameEx <- "convCP" > > ### * convCP > > flush(stderr()); flush(stdout()) > > ### Name: convCP > ### Title: Convert Contour Lines into a PolySet > ### Aliases: convCP > ### Keywords: manip > > ### ** Examples > > #--- create sample data for the contourLines() function > x <- seq(-0.5, 0.8, length=50); > y <- x; > z <- outer(x, y, FUN = function(x,y) { sin(2*pi*(x^2+y^2))^2; } ); > data <- contourLines(x, y, z, levels=c(0.2, 0.8)); > #--- pass that sample data into convCP() > result <- convCP(data); > #--- plot the result > plotLines(result$PolySet, projection=1); Warning in par(args) : gamma cannot be modified on this device > print(result$PolyData); PID SID level 1 1 1 0.2 2 1 2 0.2 3 1 3 0.2 4 1 4 0.2 5 1 5 0.2 6 1 6 0.2 7 2 1 0.8 8 2 2 0.8 9 2 3 0.8 10 2 4 0.8 11 2 5 0.8 12 2 6 0.8 13 2 7 0.8 14 2 8 0.8 15 2 9 0.8 16 2 10 0.8 > > > > cleanEx(); ..nameEx <- "convDP" > > ### * convDP > > flush(stderr()); flush(stdout()) > > ### Name: convDP > ### Title: Convert EventData/PolyData into a PolySet > ### Aliases: convDP > ### Keywords: manip > > ### ** Examples > > #--- create sample PolyData > polyData <- data.frame(PID=c(1, 2, 3), + x1=c(1, 3, 5), y1=c(1, 3, 2), + x2=c(1, 4, 5), y2=c(2, 4, 1), + x3=c(2, 4, 6), y3=c(2, 3, 1)); > > #--- print PolyData > print(polyData); PID x1 y1 x2 y2 x3 y3 1 1 1 1 1 2 2 2 2 2 3 3 4 4 4 3 3 3 5 2 5 1 6 1 > #--- make a PolySet from PolyData > polys <- convDP(polyData, + xColumns=c("x1", "x2", "x3"), + yColumns=c("y1", "y2", "y3")); > #--- print and plot the PolySet > print(polys); PID POS X Y 1 1 1 1 1 2 1 2 1 2 3 1 3 2 2 4 2 1 3 3 5 2 2 4 4 6 2 3 4 3 7 3 1 5 2 8 3 2 5 1 9 3 3 6 1 > plotLines(polys, xlim=c(0, 7), ylim=c(0, 5), col=2); Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "convLP" > > ### * convLP > > flush(stderr()); flush(stdout()) > > ### Name: convLP > ### Title: Convert Polylines into a Polygon > ### Aliases: convLP > ### Keywords: manip > > ### ** Examples > > #--- create two polylines > polyline1 <- data.frame(PID=rep(1, 2), POS=1:2, X=c(1, 4), Y=c(1, 4)); > polyline2 <- data.frame(PID=rep(1, 2), POS=1:2, X=c(2, 5), Y=c(1, 4)); > > #--- create two plots to demonstrate the effect of `reverse' > par(mfrow=c(2, 1)) > plotPolys(convLP(polyline1, polyline2, reverse = TRUE), col=2); Warning in par(args) : gamma cannot be modified on this device > plotPolys(convLP(polyline1, polyline2, reverse = FALSE), col=3); Warning in par(args) : gamma cannot be modified on this device > > > > graphics::par(get("par.postscript", env = .CheckExEnv)) > cleanEx(); ..nameEx <- "convUL" > > ### * convUL > > flush(stderr()); flush(stdout()) > > ### Name: convUL > ### Title: Convert Coordinates between UTM and Lon/Lat > ### Aliases: convUL > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- set the zone attribute > attr(nepacLL, "zone") <- 9 > #--- convert and plot the result > nepacUTM <- convUL(nepacLL) > plotMap(nepacUTM) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "extractPolyData" > > ### * extractPolyData > > flush(stderr()); flush(stdout()) > > ### Name: extractPolyData > ### Title: Extract PolyData from a PolySet > ### Aliases: extractPolyData > ### Keywords: manip > > ### ** Examples > > #--- create a PolySet with an extra column > polys <- data.frame(PID = c(rep(1, 10), rep(2, 10)), + POS = c(1:10, 1:10), + X = c(rep(1, 10), rep(1, 10)), + Y = c(rep(1, 10), rep(1, 10)), + colour = (c(rep("green", 10), rep("red", 10)))); > #--- extract the PolyData > print(extractPolyData(polys)) PID colour 1 1 green 2 2 red > > > > cleanEx(); ..nameEx <- "findPolys" > > ### * findPolys > > flush(stderr()); flush(stdout()) > > ### Name: findPolys > ### Title: Find the Polygons that Contain Events > ### Aliases: findPolys > ### Keywords: manip > > ### ** Examples > > #--- create some EventData: a column of points at X = 0.5 > events <- data.frame(EID=1:10, X=.5, Y=seq(0, 2, length=10)) > events <- as.EventData(events, projection=1); > #--- create a PolySet: two squares with the second above the first > polys <- data.frame(PID=c(rep(1, 4), rep(2, 4)), POS=c(1:4, 1:4), + X=c(0, 1, 1, 0, 0, 1, 1, 0), + Y=c(0, 0, 1, 1, 1, 1, 2, 2)) > polys <- as.PolySet(polys, projection=1); > #--- show a picture > plotPolys(polys, xlim=range(polys$X)+c(-0.1, 0.1), + ylim=range(polys$Y)+c(-0.1, 0.1), projection=1); Warning in par(args) : gamma cannot be modified on this device > addPoints(events, col=2); > #--- run findPolys and print the results > print(findPolys(events, polys)) EID PID Bdry 1 1 1 1 2 2 1 0 3 3 1 0 4 4 1 0 5 5 1 0 6 6 2 0 7 7 2 0 8 8 2 0 9 9 2 0 10 10 2 1 > > > > cleanEx(); ..nameEx <- "fixBound" > > ### * fixBound > > flush(stderr()); flush(stdout()) > > ### Name: fixBound > ### Title: Fix the Boundary Points of a PolySet > ### Aliases: fixBound > ### Keywords: manip > > ### ** Examples > > #--- set up a long horizontal and long vertical line to extend the plot's > #--- limits, and then try fixing the bounds of a line in the top-left > #--- corner and a line in the bottom-right corner > polys <- data.frame(PID=c(1, 1, 2, 2, 3, 3, 4, 4), + POS=c(1, 2, 1, 2, 1, 2, 1, 2), + X = c(0, 10, 5, 5, 0.1, 4.9, 5.1, 9.9), + Y = c(5, 5, 0, 10, 5.1, 9.9, 0.1, 4.9)) > polys <- fixBound(polys, tol=0.0100001) > plotLines(polys) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "fixPOS" > > ### * fixPOS > > flush(stderr()); flush(stdout()) > > ### Name: fixPOS > ### Title: Fix the POS Column of a PolySet > ### Aliases: fixPOS > ### Keywords: manip > > ### ** Examples > > #--- create a PolySet with broken POS numbering > polys <- data.frame(PID = c(rep(1, 10), rep(2, 10)), + POS = c(seq(2, 10, length = 10), seq(10, 2, length = 10)), + X = c(rep(1, 10), rep(1, 10)), + Y = c(rep(1, 10), rep(1, 10))) > #--- fix the POS numbering > polys <- fixPOS(polys) > #--- print the results > print(polys) PID POS X Y 1 1 1 1 1 2 1 2 1 1 3 1 3 1 1 4 1 4 1 1 5 1 5 1 1 6 1 6 1 1 7 1 7 1 1 8 1 8 1 1 9 1 9 1 1 10 1 10 1 1 11 2 10 1 1 12 2 9 1 1 13 2 8 1 1 14 2 7 1 1 15 2 6 1 1 16 2 5 1 1 17 2 4 1 1 18 2 3 1 1 19 2 2 1 1 20 2 1 1 1 > > > > cleanEx(); ..nameEx <- "isConvex" > > ### * isConvex > > flush(stderr()); flush(stdout()) > > ### Name: isConvex > ### Title: Determine Whether Polygons are Convex > ### Aliases: isConvex > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL); > #--- calculate then print the polygons that are convex > p <- isConvex(nepacLL); > #--- nepacLL actually contains no convex polygons > print(p[p$convex, ]); [1] PID convex <0 rows> (or 0-length row.names) > > > > cleanEx(); ..nameEx <- "isIntersecting" > > ### * isIntersecting > > flush(stderr()); flush(stdout()) > > ### Name: isIntersecting > ### Title: Determine Whether Polygons are Self-Intersecting > ### Aliases: isIntersecting > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL); > #--- calculate then print the polygons that are self-intersecting > p <- isIntersecting(nepacLL, numericResult = FALSE); > print(p[p$intersecting, ]); PID intersecting 2 1 TRUE 131 2135 TRUE 235 4402 TRUE > > > > cleanEx(); ..nameEx <- "joinPolys" > > ### * joinPolys > > flush(stderr()); flush(stdout()) > > ### Name: joinPolys > ### Title: Join One or Two PolySets using a Logic Operation > ### Aliases: joinPolys > ### Keywords: manip logic > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- create a triangle to use in clipping > polysB <- data.frame(PID=rep(1, 3), POS=1:3, + X=c(-127.5, -124.5, -125.6), Y = c(49.2, 50.3, 48.6)) > #--- intersect nepacLL with the single polygon, and plot the result > plotMap(joinPolys(nepacLL, polysB), col=5) Warning in par(args) : gamma cannot be modified on this device > #--- add nepacLL in a different line type to emphasize the intersection > addPolys(nepacLL, border=2, lty=8, density=0) > > > > cleanEx(); ..nameEx <- "locateEvents" > > ### * locateEvents > > flush(stderr()); flush(stdout()) > > ### Name: locateEvents > ### Title: Locate Events on the Current Plot > ### Aliases: locateEvents > ### Keywords: iplot > > ### ** Examples > > #--- define five events on the current plot, numbering them 10 to 14 > ## Not run: events <- locateEvents(EID = 10:14) > > > > cleanEx(); ..nameEx <- "locatePolys" > > ### * locatePolys > > flush(stderr()); flush(stdout()) > > ### Name: locatePolys > ### Title: Locate Polygons on the Current Plot > ### Aliases: locatePolys > ### Keywords: iplot > > ### ** Examples > > #--- define one polygon with up to 5 vertices on the current plot > ## Not run: polys <- locatePolys(n = 5) > > > > cleanEx(); ..nameEx <- "makeGrid" > > ### * makeGrid > > flush(stderr()); flush(stdout()) > > ### Name: makeGrid > ### Title: Make a Grid of Polygons > ### Aliases: makeGrid > ### Keywords: manip > > ### ** Examples > > #--- make a 10 x 10 grid > polyGrid <- makeGrid(x=0:10, y=0:10) > #--- plot the grid > plotPolys(polyGrid, density=0, projection=1) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "makeProps" > > ### * makeProps > > flush(stderr()); flush(stdout()) > > ### Name: makeProps > ### Title: Make Polygon Properties > ### Aliases: makeProps > ### Keywords: manip > > ### ** Examples > > #--- create a PolyData object > pd <- data.frame(PID=1:10, Z=1:10) > > #--- using 3 intervals, create a column named `col' and populate it with > #--- the supplied values > makeProps(pdata = pd, breaks = 3, propName = "col", + propVals = c(1:3)) PID Z col 1 1 1 1 2 2 2 1 3 3 3 1 4 4 4 2 5 5 5 2 6 6 6 2 7 7 7 2 8 8 8 3 9 9 9 3 10 10 10 3 > > > > cleanEx(); ..nameEx <- "makeTopography" > > ### * makeTopography > > flush(stderr()); flush(stdout()) > > ### Name: makeTopography > ### Title: Make Topography Data From Freely Available Online Data > ### Aliases: makeTopography > ### Keywords: manip > > ### ** Examples > > #--- create a sample data frame > file <- data.frame(X=c(1, 1, 2, 2), Y=c(3, 4, 3, 4), Z=c(5, 6, 7, 8)) > > #--- convert that data frame to the output format, and print the results > print(makeTopography(file)); $x [1] 1 2 $y [1] 3 4 $z [,1] [,2] [1,] 5 6 [2,] 7 8 > > > > cleanEx(); ..nameEx <- "plotLines" > > ### * plotLines > > flush(stderr()); flush(stdout()) > > ### Name: plotLines > ### Title: Plot a PolySet as Polylines > ### Aliases: plotLines > ### Keywords: hplot > > ### ** Examples > > #--- create a PolySet to plot > polys <- data.frame(PID=rep(1, 4), POS=1:4, X=c(0, 1, 1, 0), Y=c(0, 0, 1, 1)) > #--- plot the PolySet > plotLines(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5)) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "plotMap" > > ### * plotMap > > flush(stderr()); flush(stdout()) > > ### Name: plotMap > ### Title: Plot a PolySet as a Map > ### Aliases: plotMap > ### Keywords: hplot > > ### ** Examples > > #--- create a PolySet to plot > polys <- data.frame(PID=rep(1, 4), POS=1:4, X=c(0, 1, 1, 0), Y=c(0, 0, 1, 1)) > #--- plot the PolySet > plotMap(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5), density=0, projection=1) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "plotPoints" > > ### * plotPoints > > flush(stderr()); flush(stdout()) > > ### Name: plotPoints > ### Title: Plot EventData/PolyData as Points > ### Aliases: plotPoints > ### Keywords: aplot > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) { + data(nepacLL) + data(surveyData) + } > #--- plot a map > plotMap(nepacLL, xlim=c(-136, -125), ylim=c(48, 57)) Warning in par(args) : gamma cannot be modified on this device > #--- add events > addPoints(surveyData, col=1:7) > > > > cleanEx(); ..nameEx <- "plotPolys" > > ### * plotPolys > > flush(stderr()); flush(stdout()) > > ### Name: plotPolys > ### Title: Plot a PolySet as Polygons > ### Aliases: plotPolys > ### Keywords: hplot > > ### ** Examples > > #--- create a PolySet to plot > polys <- data.frame(PID=rep(1, 4), POS=1:4, X=c(0, 1, 1, 0), Y=c(0, 0, 1, 1)) > #--- plot the PolySet > plotPolys(polys, xlim=c(-.5,1.5), ylim=c(-.5,1.5), density=0) Warning in par(args) : gamma cannot be modified on this device > > > > cleanEx(); ..nameEx <- "print" > > ### * print > > flush(stderr()); flush(stdout()) > > ### Name: print > ### Title: Print PBS Mapping Objects > ### Aliases: print.EventData print.LocationSet print.PolyData print.PolySet > ### print.summary.PBS > ### Keywords: IO > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- change to summary printing style > PBSprint <- TRUE > #--- print the PolySet > print(nepacLL) PolySet Records : 75929 Contours : 536 Holes : 0 Events : NA On boundary : NA Ranges X : [-190, -110] Y : [34, 72] Attributes Projection : LL Zone : NULL Extra columns : > > > > cleanEx(); ..nameEx <- "summary" > > ### * summary > > flush(stderr()); flush(stdout()) > > ### Name: summary > ### Title: Summarize PBS Mapping Objects > ### Aliases: summary.EventData summary.LocationSet summary.PolyData > ### summary.PolySet > ### Keywords: methods > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(surveyData) > print(summary(surveyData)) EventData Records : 674 Contours : NA Holes : NA Events : 674 On boundary : NA Ranges X : [-135.981666, -125.615833] Y : [48.085833, 56.833333] Attributes Projection : LL Zone : 9 Extra columns : trip, tow, catch, effort, depth, year > > > > cleanEx(); ..nameEx <- "thickenPolys" > > ### * thickenPolys > > flush(stderr()); flush(stdout()) > > ### Name: thickenPolys > ### Title: Thicken a PolySet of Polygons > ### Aliases: thickenPolys > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- plot Vancouver Island > plotMap(nepacLL[nepacLL$PID == 33, ]) Warning in par(args) : gamma cannot be modified on this device > #--- calculate a thickened version using a 30 kilometers tolerance, > #--- without keeping the original points > p <- thickenPolys(nepacLL[nepacLL$PID == 33, ], tol = 30, keepOrig = FALSE) > #--- convert the PolySet to EventData by dropping the PID column and > #--- renaming POS to EID > p <- p[-1]; > names(p)[1] <- "EID"; > #--- convert the now invalid PolySet into a data frame, and then into > #--- EventData > p <- as.EventData(as.data.frame(p), projection="LL"); > #--- plot the results > addPoints(p, col=2, pch=19) > > > > cleanEx(); ..nameEx <- "thinPolys" > > ### * thinPolys > > flush(stderr()); flush(stdout()) > > ### Name: thinPolys > ### Title: Thin a PolySet of Polygons > ### Aliases: thinPolys > ### Keywords: manip > > ### ** Examples > > #--- load the data (if using R) > if (!is.null(version$language) && (version$language == "R")) + data(nepacLL) > #--- plot a thinned version of Vancouver Island (3 km tolerance) > plotMap(thinPolys(nepacLL[nepacLL$PID == 33, ], tol = 3)) Warning in par(args) : gamma cannot be modified on this device > #--- add the original Vancouver Island in a different line type to > #--- emphasize the difference > addPolys(nepacLL[nepacLL$PID == 33, ], border=2, lty=8, density=0) > > > > ### *