R/Randomise_elements.R

Defines functions Randomise_elements

Documented in Randomise_elements

#' Randomise individual elements in the F matrix.
#' 
#' @keywords internal
#'
#' @param x   xx
#' @param min.scaler     xx 
#' @param max.scaler     xx
#'
#' @return numeric
#'
#' @examples
Randomise_elements <- function(x, min.scaler, max.scaler){
  x <- ifelse(x<0.001, 0.001, x)
  round(runif(n=1, min = x*min.scaler, max = x*max.scaler), digits = 4)
}

Try the phytoclass package in your browser

Any scripts or data that you put into this service are public.

phytoclass documentation built on April 4, 2025, 4:02 a.m.