Package 'imanr'

Title: Identify the Racial Complex of Native Corns from Mexico
Description: A 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. This package has been developed based on data collected by "Proyecto Global de Maíces Nativos México", which has conducted exhaustive surveys across the country to document the qualitative and quantitative characteristics of different types of native maize. The trained model uses a robust and diverse dataset, enabling it to achieve an 80% accuracy in classifying maize racial complexes. The characteristics included in the analysis comprise geographic location, grain and cob colors, as well as various physical measurements, such as lengths and widths.
Authors: Rafael Nieves-Alvarez [aut, cre] , Arturo Sanchez-Porras [aut, cph] , Aline Romero-Natale [aut] , Otilio Arturo Acevedo-Sandoval [aut]
Maintainer: Rafael Nieves-Alvarez <[email protected]>
License: GPL (>= 3)
Version: 1.0.2
Built: 2024-12-22 06:36:34 UTC
Source: CRAN

Help Index


Data to show the functioning of imanr functions

Description

Dataset of characteristics of native Mexican corn cobs obtained from the "Proyecto Global de Maíces Nativos" considering the most relevant variables and a subset of observations for the examples.

Usage

data("data24")

Format

A data frame with 24 observations and 61 variables.

Source

Data available on the website: <https://biodiversidad.gob.mx/diversidad/proyectoMaices>.

References

CONABIO. 2011. Proyecto Global de Maíces Nativos. Comisión Nacional para el Conocimiento y Uso de la Biodiversidad; Instituto Nacional de Investigaciones Forestales, Agrícolas y Pecuarias; Instituto Nacional de Ecología y cambio Climático. México. https://biodiversidad.gob.mx/diversidad/proyectoMaices.

Examples

data(data24)                    # lazy loading
str(data24)

Data to show the functioning of imanr functions

Description

Dataset of characteristics of native Mexican corn cobs obtained from the "Proyecto Global de Maíces Nativos" considering the most relevant variables and a subset of observations for the examples.

Usage

data("data31")

Format

A data frame with 31 observations and 61 variables.

Source

Data available on the website: <https://biodiversidad.gob.mx/diversidad/proyectoMaices>.

References

CONABIO. 2011. Proyecto Global de Maíces Nativos. Comisión Nacional para el Conocimiento y Uso de la Biodiversidad; Instituto Nacional de Investigaciones Forestales, Agrícolas y Pecuarias; Instituto Nacional de Ecología y cambio Climático. México. https://biodiversidad.gob.mx/diversidad/proyectoMaices.

Examples

data(data31)                    # lazy loading
str(data31)

Identify the Racial Complex of native corn from Mexico

Description

Identify the Racial Complex of native corn from Mexico

Usage

find_racial_complex(data)

Arguments

data

A dataset that contains qualitative and quantitative characteristics of a corn ear or series of ears. The selected characteristics are related to colors, some measurements and the locations in which the corn was grown. A template for what has to be filled will be included on the GitHub page of the project.

Value

findraciacomplex() returns a racial complex classification for the dataset or single observation that the user entered

Author(s)

Rafael Nieves-Alvarez ([email protected]), Arturo Sanchez-Porras, Aline Romero-Natale, Otilio Arturo Acevedo-Sandoval

References

James, G., Witten, D., Hastie, T., & Tibshirani, R. (2013). An introduction to statistical learning: With applications in R (1st ed.). Springer.\ Kuhn, M., & Johnson, K. (2013). Applied predictive modeling (1st ed.). Springer.\ Monroy, L. G. D. (2007). Estadística Multivariada: Inferencia y Métodos. Univ. Nacional.

See Also

[impute_data()]

Examples

df <- find_racial_complex(data31)
df

Impute the data implementing random forest for native corn data.

Description

Impute and prepare a dataframe to apply the find_racialcomplex() function, in case the dataframe has missing values. The imputation is done with random forests. The database must have the same variables as those in bdMaiz.rds in this same package.

Usage

impute_data(data, useParallel = FALSE)

Arguments

data

An incomplete dataset that contains qualitative and quantitative characteristics of a corn or series of corns. The selected characteristics are related to colors, some measurements, and the locations in which the corn was grown. A template for what has to be filled will be included on the GitHub page of the project.

useParallel

Logical. Perform the analysis in parallel? Defaults to FALSE.

Value

impute_data()returns an imputed dataset that can be used with find_racialcomplex().

Author(s)

Rafael Nieves-Alvarez ([email protected]), Arturo Sanchez-Porras, Aline Romero-Natale, Otilio Arturo Acevedo-Sandoval

References

Báez Vergara, K. J. Estimación de datos faltantes a través de redes neuronales, una comparación con métodos simples y múltiples (Doctoral dissertation, Universidad Santo Tomás).

See Also

[find_racialcomplex()]

Examples

set.seed(42)
df <- data24[17,]
df

df_imp <- impute_data(df, useParallel = FALSE)
df_imp