# NOT RUN {
# get the subset of a geom
obj <- gtGeoms$point
# the first feature
getSubset(x = gtGeoms$line, fid == 1)
# get the subset of a Spatial object
getSubset(x = gtSP$SpatialPolygonsDataFrame,
a == 2)
# get the subset of an sf object
getSubset(x = gtSF$polygon, a == 1)
# }
Run the code above in your browser using DataLab