Learn R Programming

sarp.snowprofile

Functions to import/export snow profile data from various formats, as well as basic formatting and visualization functions.

Installation

Install CRAN release via install.packages('sarp.snowprofile') and track development at https://bitbucket.org/sfu-arp/sarp.snowprofile.

Examples

View vignette('sarp.snowprofile') for a package overview.

Copy Link

Version

Install

install.packages('sarp.snowprofile')

Monthly Downloads

221

Version

1.3.2

License

CC BY-SA 4.0

Maintainer

Pascal Haegeli

Last Published

March 8th, 2023

Functions in sarp.snowprofile (1.3.2)

getColoursGrainType

Gets colours for plotting snow grain types
getColoursDensity

Gets colours for plotting snow density values
getColoursLWC

Gets colours for plotting LWC values
format_snowprofileLayers

Format snowprofileLayers
getColoursGrainSize

Gets colours for plotting grain size values
getColoursPercentage

Gets colours for plotting the snow layer property 'percentage'
getColoursHardness

Gets colours for plotting snow hardness values
findPWL

Find layers of interest (e.g. PWLs) in snowprofile(Layers)
export.snowprofileCsv

Export or write a snowprofile object to a CSV table
deriveDatetag

Derive datetag from deposition dates in simulated profiles
getColoursSnowTemp

Gets colours for plotting snow temperature values
insertUnobservedBasalLayer

Insert a special layer at the bottom to indicate a snow profile that's unobserved from a specific point down to the ground internal function, not exported. used in snowprofileLayers
importRDefaultPackages

Import R_DEFAULT_PACKAGES
getColoursStability

Gets colours for plotting snow stability indices
is.snowprofileSet

Check class snowprofileSet
is.snowprofile

Check class snowprofile
is.snowprofileLayers

Check class snowprofileLayers
is.snowprofileInstabilitySigns

Check class snowprofileInstabilitySigns
grainDict

A data.frame storing the grain type colours
hasUnobservedBasalLayer

Check whether a profile is observed down to ground or not
numberOfPWLsPerVerticalLevel

Count number of PWLs per vertical level
rbind.snowprofileSet

Concatenate snowprofileSet into a large data.frame with a row for each layer
plot.snowprofileSet

Plot a single layer property in multiple profiles side-by-side
print.snowprofile

Print snowprofile object
reformat_snowprofile

Reformat a malformatted snowprofile object
is.snowprofileTests

Check class snowprofileTests
rbind.snowprofile

Convert snowprofile into data.frame with columns for metadata
readSmet

Parse a SMET file
sarp.snowprofile-package

sarp.snowprofile: Snow Profile Analysis for Snowpack and Avalanche Research
snowprofile

High-level constructor for a snowprofile object
simplifyGtypes

Simplify detailed grain types to parent classes
scanProfileDates

Read profile dates from prf/pro file
snowprofileCsv_advanced

Read routine for advanced csv tables containing various snowprofile information
snowprofileInstabilitySigns

Constructor for a snowprofileInstabilitySigns object
setColoursGrainType

Set colour scale for grain types
sd_sample_uncorrected

fast uncorrected sample standard deviation https://en.wikipedia.org/wiki/Standard_deviation#Rapid_calculation_methods
new_snowprofile

Low-level constructor function for a snowprofile object
snowprofileSno

Construct snowprofile object from SNO file
plot.snowprofile

Plot hardness profile
summary.snowprofile

Summary of a single snowprofile
snowprofileCaaml

Read a Caaml file into a snowprofile object
snowprofileCsv

Read csv file into a snowprofile object
swisscode

Numerical, Swiss Grain Type Code
summary.snowprofileSet

Summarize multiple snowprofiles
[.snowprofileSet

Extract method
validate_snowprofile

Validate correctness of snowprofile object
validate_snowprofileLayers

Validate correctness of snowprofileLayers object
snowprofileSet

Constructor for class snowprofileSet
writeSmet

Write a SMET file
snowprofilePro

Construct snowprofile object from PRO file
snowprofileTests

Constructor for a snowprofileTests object
snowprofilePrf

Construct snowprofile object from PRF file
snowprofileLayers

Constructor for a snowprofileLayers object
computeRTA

Compute Relative Threshold Sum approach (RTA)
char2numHHI

Conversion of Hand Hardness Index (HHI)
char2numAspect

Conversion of character Aspects to numeric Aspects
SPgroup

Example group of snowprofiles from a mountain drainage
computeSLABrho

Compute mean density of slab
SPpairs

Pairs of example snowprofiles
SPtimeline

Timeseries of snowprofiles #'
computeTSA

Compute Threshold Sum Approach (TSA, lemons, yellow flags, 'Nieten')
computeSLABrhogs

Compute 'density over grain size' averaged over slab
SPmalformatted

Malformatted example profiles