Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

extractPolyData

Extract PolyData from a PolySet


Description

Extract PolyData from a PolySet. Columns for the PolyData include those other than PID, SID, POS, oldPOS, X, and Y.

Usage

extractPolyData (polys)

Arguments

polys

PolySet to use.

Details

This function identifies the PolySet's extra columns and determines if those columns contain unique values for each (PID, SID). Where they do, the (PID, SID) will appear in the PolyData output with that unique value. Where they do not, the extra column will contain NAs for that (PID, SID).

Value

PolyData with columns PID, SID, and any extra columns.

Author(s)

Nicholas M. Boers, Associate Professor – Computer Science
MacEwan University, Edmonton AB
Last modified Rd: 2013-04-10

See Also

Examples

local(envir=.PBSmapEnv,expr={
  #--- 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))
})

PBSmapping

Mapping Fisheries Data and Spatial Analysis Tools

v2.73.0
GPL (>= 2)
Authors
Jon T. Schnute [aut], Nicholas Boers [aut], Rowan Haigh [aut, cre], Alex Couture-Beil [ctb], Denis Chabot [ctb], Chris Grandin [ctb], Angus Johnson [ctb], Paul Wessel [ctb], Franklin Antonio [ctb], Nicholas J. Lewin-Koh [ctb], Roger Bivand [ctb]
Initial release
2021-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.