SumSLCClasses {HYPEtools} | R Documentation |
Calculate sums of SLC classes in a GeoData file
Description
SumSLCClasses
sums all SLC classes for each SUBID in a GeoData data frame and optionally plots the results.
Usage
SumSLCClasses(gd, plot.box = TRUE, silent = FALSE, ...)
Arguments
gd |
Data frame containing columns with SLC fractions, typically a 'GeoData.txt' file imported with |
plot.box |
Logical, if |
silent |
Logical, if set to |
... |
Other arguments to be passed to |
Details
SumSLCClasses
is a wrapper for colSums
with a boxplot output option, and allows to quickly control if SLCs of all SUBIDs in a
GeoData data frame sum up to 1.
Value
SumSLCClasses
returns a vector of SLC sums, invisibly if plot.box
is TRUE
.
Examples
te <- ReadGeoData(filename = system.file("demo_model", "GeoData.txt", package = "HYPEtools"))
SumSLCClasses(gd = te, plot.box = TRUE)
SumSLCClasses(gd = te, plot.box = FALSE)
[Package HYPEtools version 1.6.2 Index]