| subset.osmar {osmar} | R Documentation |
Subset an osmar object
## S3 method for class 'osmar'
subset(x, node_ids = NULL,
way_ids = NULL, relation_ids = NULL,
ids = list(node_ids = node_ids, way_ids = way_ids, relation_ids = relation_ids),
...)
x |
An |
node_ids |
Node ID vector |
way_ids |
Way ID vector |
relation_ids |
Relation ID vector |
ids |
A list composed of |
... |
Ignored |
An osmar object containing the specified
elements
data("muc", package = "osmar")
id <- find(muc, node(tags(v == "Marienplatz")))
subset(muc, node_ids = id)
subset(muc, ids = find_up(muc, node(id)))