ncss-tech / SoilTaxonomy

A System of Soil Classification for Making and Interpreting Soil Surveys
https://ncss-tech.github.io/SoilTaxonomy/
GNU General Public License v3.0
14 stars 2 forks source link

GreatGroupFormativeElements() and multiple matches #7

Closed dylanbeaudette closed 3 years ago

dylanbeaudette commented 5 years ago

Need to use the same strategy as SubOrderFormativeElements().

GreatGroupFormativeElements('acrustoxic kanhaplustults')

This has to do with map_int() expecting a single value / element.

  x
 1. +-SoilTaxonomy::GreatGroupFormativeElements("acrustoxic kanhaplustults")
 2. | \-purrr::map_int(loc.start, .safelyPickNotNA)
 3. \-purrr:::stop_bad_element_vector(...)
 4.   \-purrr:::stop_bad_vector(...)
 5.     \-purrr:::stop_bad_type(...)
brownag commented 3 years ago

This issue is resolved since {purrr} dependency was dropped. Came with reorganization of the package in #14 and use of lookup table rather than pattern matching to determine parent-child relationships