summary.snowprofileSet: Summarize multiple snowprofiles

View source: R/summary.snowprofileSet.R

summary.snowprofileSetR Documentation

Summarize multiple snowprofiles

Description

Wrapper for summary.snowprofile, which only returns metadata for a single snowprofile object. summary.snowprofileSet provides metadata for multiple snowprofiles, which is useful for subsetting.

Usage

## S3 method for class 'snowprofileSet'
summary(object, fast = TRUE, ...)

Arguments

object

list of snowprofile objects

fast

boolean switch to speed up computations, see summary.snowprofile

...

additional arguments for generic method

Value

data.frame

Author(s)

shorton

See Also

summary.snowprofile, rbind.snowprofileSet

Examples


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


sarp.snowprofile documentation built on March 31, 2023, 5:17 p.m.