Learn R Programming

sarp.snowprofile (version 1.3.2)

simplifyGtypes: Simplify detailed grain types to parent classes

Description

The IACS records grain types in major and minor classes, e.g. precipitation particles PP can be subclassified into stellar dendrites PPsd. Some of these subclasses are not supported in this R package and so this function simplifies the unsupported gran type subclasses into their supported main classes. If a given grain type cannot be simplified, a NA value is returned for it.

Usage

simplifyGtypes(gtypes, supported_gtypes = grainDict$gtype)

Value

the modified input array

Arguments

gtypes

an array of character grain types following IACS standards

supported_gtypes

an array of supported grain types that will determine the simplification

Author

fherla

Examples

Run this code
## create an array of gtypes
gtypes <- c('FCxr', 'RGxf', 'PPsd', 'PP', 'IFrc', "KKfx")

## sinplify gtypes to supported_gtypes:
simplifyGtypes(gtypes)

Run the code above in your browser using DataLab