edzer / spacetime

Classes and methods for spatio-temporal data
73 stars 20 forks source link

Added selection methods #10

Closed ghost closed 10 years ago

ghost commented 10 years ago

Try:

library(spacetime)
example(Track)
# Gives a vector with an attribute.
Tr[["co2"]]
Tr$co2
# Sets distance attribute.
Tr[["distance"]] = Tr[["distance"]] * 1000
Tr$distance = Tr$distance / 1000
# Gives a TracksCollection object with only distance as attribute.
Tr[, "distance"]

Please see the documentation for outstanding (?) design issues.