Nothing
#' @title Check input
#'
#' @description Checks if x is a proper input
#'
#' @param x Vector of dimension S (number of species) with the number of individuals observed in each species, or the distribution frequencies of species. NA values are allowed.
#'
#' @return x without NA or 0 values
#'
#' @keywords internal
check_x <- function(x){
x <- stats::na.omit(x)
stopifnot(is.numeric(x))
x <- ifelse(x==0, NA, x)
x <- stats::na.omit(x)
stopifnot(all(x >0))
if (sum(x) !=1) stopifnot(isTRUE(all.equal(x, round(x))))
return(x)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.