## Extract metadata for a group of profiles
Metadata <- summary(SPgroup)
head(Metadata)
## Subsetting profiles with Metadata
Alpine <- SPgroup[Metadata$elev > 2000]
summary(Alpine)
Shallow <- SPgroup[Metadata$hs < 150]
summary(Shallow)
Week2 <- SPtimeline[summary(SPtimeline)$date > '2017-12-15']
## time comparison of fast--slow implementation
## expect 20 sec runtime
# rbenchmark::benchmark(fast = {Metadata <- summary(SPgroup, fast = TRUE)},
# slow = {Metadata <- summary(SPgroup, fast = FALSE)},
# replications = 10**3)
Run the code above in your browser using DataLab