Learn R Programming

sarp.snowprofile (version 1.3.2)

char2numHHI: Conversion of Hand Hardness Index (HHI)

Description

Convert character hand hardness index (HHI) of snow layers to numeric values. For example, hand hardness Fist becomes 1, Ice becomes 6.

Usage

char2numHHI(charHHI)

Value

Float value of numeric hand hardness level between 1 and 6.

Arguments

charHHI

Character string of hand hardness level, i.e., one of

  • Fist 'F', 4 Fingers '4F', 1 Finger '1F', Pencil 'P', Knife 'K', or Ice 'I'

  • intermediate values allowed, e.g. 'F+', '1F-', 'F-4F'

Author

fherla

Examples

Run this code
char2numHHI('F+')
char2numHHI('F-')
char2numHHI('F-4F')

## not meaningful:
this_throws_error <- TRUE
if (!this_throws_error) {
char2numHHI('F-P')
}

Run the code above in your browser using DataLab