Extract a single column from a geometric object
This function allows to extract a specific column from any geometric object
for which all required getters are available and thus reflects the base
function $
.
gt_pull(obj, var, ungroup = FALSE)
obj |
[ |
var |
[ |
ungroup |
[ |
This function searches for var
by first looking in the
groups, then the features and finally the points of obj
. This
results always in an output that is limited to the unique cases of
var
. In case you want the explicit values of, for instance,
fid
in obj@points
, you have to extract points and then use
pull
on the result.
vector of the column specified in var
.
Other geometry tools:
gt_filter()
,
gt_locate()
,
gt_reflect()
,
gt_rotate()
,
gt_scale()
,
gt_skew()
,
gt_stretch()
,
gt_translate()
# pull values from a geom (there are two features, thus two values) ... gt_pull(gtGeoms$point, "fid") # pull from a Raster* with RAT gt_pull(gtGeoms$grid$categorical, "cover") # pull from an sf-object gt_pull(gtSF$point, "a")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.