extractPolyData | R Documentation |
Extract PolyData from a PolySet. Columns for the
PolyData include those other than PID
, SID
,
POS
, oldPOS
, X
, and Y
.
extractPolyData (polys)
polys |
PolySet to use. |
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 NA
s for that
(PID
, SID
).
PolyData with columns PID
, SID
, and any extra
columns.
Nicholas M. Boers, Staff Software Engineer
Jobber, Edmonton AB
Last modified Rd: 2013-04-10
makeProps
,
PolyData,
PolySet.
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))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.