CSIcalc | R Documentation |
Calculate monthly CSI values from salinity object for a set of sites over a range of scales.
CSIcalc(sal, scale = 24, lmode = FALSE)
sal |
data.frame with Year and Month timestamp columns, with columns of site salinity values. Generally created by one of the CSIimport_ family functions. |
scale |
integer representing the scale at which the CSI will be computed. For example, a value of six would imply that data from the current month and of the past five months will be used for computing the CSI value for a given month. |
lmode |
logical. If true, L-moments are used in calculating alpha and beta parameters of gamma distribution as per SPEI package and Vicente-Serrano et al., 2010. If false (default), no L-moments are used, and gamma distribution parameters are caluclated directly from the observed data as per National Drought Mitigation Center (http://drought.unl.edu/MonitoringTools/DownloadableSPIProgram.aspx) and McKee et al., 1993. |
A 3D array of CSI values with dimensions of number of months covered, scale of months analysed (typically 1-24), and number of sites.
# Data file with Year and Month columns
data_path <- system.file("extdata", "Monthly_Coastal_EDEN.csv", package = "CSI")
sal <- CSIimport_monthly(data_path)
csi <- CSIcalc(sal)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.