# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Mapping MRL data frame by line
#'
#' @description this Rcpp function `mapping_mrl()` construct a map object
#' <String, NumericVector> using prduct name as key and numbers of drugs' MRL values
#' vector of this product as value. In this case, users can easily and efficiently query
#' MRL numeric vector with product's name.
#'
#' @param mrl MRL numeric matrix of each product (row) in each drug (column)
#' @param products character vector composed of product names, which correspond to each
#' row in param `mrl`
#'
#' @return
#' std::map<String, NumericVector> in Rcpp and List in R.
mapping_mrl <- function(mrl, products) {
.Call(`_antgreens_mapping_mrl`, mrl, products)
}
#' Calculate residue index using MRL list
#'
#' @description this Rcpp function `calc_use_mrl()` receives test values matrix and
#' returns a numeric matrix that each value have to be divide by correspoding MRL value.
#'
#' @param vm test values matrix of each product (row) in each drug (column)
#' @param products character vector composed of product names, which correspond to each
#' row in param `vm`
#' @param mrl_map a R object List that the product name is used as a key and the MRL
#' standards vector on pesticides is used as a value.
#'
#' @return
#' numeric matrix where each value have to be divided by corresponding MRL standard.
calc_residue_index <- function(vm, products, mrl_map) {
.Call(`_antgreens_calc_residue_index`, vm, products, mrl_map)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.