way
relation
node
find_up
finds all elements upwards the hierarchy:
node
way
relation
node
data("muc", package = "osmar")
o1 <- find(muc, way(tags(k == "highway" & v == "pedestrian")))
find_down(muc, way(o1))
find_up(muc, way(o1))
Run the code above in your browser using DataLab