subset.osmar {osmar}R Documentation

Subset an osmar object

Description

Subset an osmar object

Usage

  ## 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),
    ...)

Arguments

x

An osmar object

node_ids

Node ID vector

way_ids

Way ID vector

relation_ids

Relation ID vector

ids

A list composed of node_ids, way_ids, relation_ids; for easier usage with results from find_up and find_down

...

Ignored

Value

An osmar object containing the specified elements

Examples

data("muc", package = "osmar")
  id <- find(muc, node(tags(v == "Marienplatz")))

  subset(muc, node_ids = id)

  subset(muc, ids = find_up(muc, node(id)))

[Package osmar version 1.1-7 Index]