Learn R Programming

imanr

Identify the Racial Complex of Native Corns from Mexico

Identificador de Maíz Nativo en R

imanr is model that provides researchers with a powerful tool for the classification and study of native corn by aiding in the identification of racial complexes which are fundamental to Mexico’s agriculture and culture.

Installation

# As of today, you can install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("rafa6174/imanr")

Usage

The package is composed of two functions: find_racial_complex() and impute_data().

impute_data() is used to preprocess the data by imputing the missing information by comparing the absent fields with the full information from the “Proyecto Nacional de Maíz Nativo” database and then filling the gaps with adequate data that is computed through a random forests approach. find_racial_complex() is loaded with the machine learning model that computes the classification for the corn sample that is being fed to the function. The function takes only one argument which is a dataframe including qualitative and quantitative characteristics of the native corn.

# test for racial complexes
find_racial_complex(data31)

#> [1] Tropicales tardíos  Dentados tropicales Dentados tropicales Dentados tropicales
#> [5] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [9] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [13] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [17] Dentados tropicales Dentados tropicales Tropicales tardíos  Dentados tropicales
#> [21] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [25] Dentados tropicales Dentados tropicales Dentados tropicales Dentados tropicales
#> [29] Dentados tropicales Dentados tropicales Dentados tropicales
#> 7 Levels: Chapalote Cónico Dentados tropicales Ocho hileras ... Tropicales tardíos

R packages required for running imanr

  • Required: missForest, tidymodels, xgboost, bundle, dplyr, parallel, doParallel, foreach

Participating institutions

Copy Link

Version

Install

install.packages('imanr')

Monthly Downloads

151

Version

2.0.0

License

GPL (>= 3)

Maintainer

Rafael Nieves-Alvarez

Last Published

February 12th, 2025

Functions in imanr (2.0.0)

impute_data

Impute the data implementing random forest for native corn data.
data24

Data to show the functioning of imanr functions
find_racial_complex

Identify the Racial Complex of native corn from Mexico
data31

Data to show the functioning of imanr functions