simplifyGtypes: Simplify detailed grain types to parent classes

View source: R/simplifyGtypes.R

simplifyGtypesR Documentation

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)

Arguments

gtypes

an array of character grain types following IACS standards

supported_gtypes

an array of supported grain types that will determine the simplification

Value

the modified input array

Author(s)

fherla

Examples

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

## sinplify gtypes to supported_gtypes:
simplifyGtypes(gtypes)


sarp.snowprofile documentation built on March 31, 2023, 5:17 p.m.