The CSI (Coastal Salinity Index) package is designed to import salinity data in a variety of formats, clean and interpolate missing data, calculate CSI and other similar metrics, and produce CSV and graphical outputs. The CSI is based on the SPI/SPEI (Standardized Precipitation Index/Standardized Precipitation-Evapotranspiration Index) package metrics. CSI is able to:

Coastal Salinity Index (CSI) Info

The Coastal Salinity Index (CSI) calculates the excursion of a particular month from the typical salinity values for that month. Negative values indicate months of lower salinity than historically typical for that calendar month (e.g., wetter); positive values indicate months with higher salinities than typical (e.g., drier). CSI values remove the absolute local components of the measured salinities, and produce relative values that can more usefully be compared between different localities.

Output

The CSI template includes production of a basic CSV theme. To override this theme you can specify your own CSS in the document metadata as follows:

output: 
  rmarkdown::html_vignette:
    css: mystyles.css

Figures

The figure sizes have been customised so that you can easily put two images side-by-side.

plot(1:10)
plot(10:1)

You can enable figure captions by fig_caption: yes in YAML:

output:
  rmarkdown::html_vignette:
    fig_caption: yes

Then you can use the chunk option fig.cap = "Your figure caption." in knitr.

More Examples

You can write math expressions, e.g. $Y = X\beta + \epsilon$, footnotes^[A footnote here.], and tables, e.g. using knitr::kable().

knitr::kable(head(mtcars, 10))

"He who gives up [code] safety for [code] speed deserves neither." (via)



USGS-R/CSI documentation built on April 20, 2023, 3:57 p.m.