#' Title
#'
#' @param crowdsimulation
#'
#' @return
#' @export
#'
#' @examples
releff <- function(crowdsimulation){
if(!is(crowdsimulation,"crowdsimulation")) stop("Argument not valid")
vec <- names(crowdsimulation$Htest)=="stratsample"
index <- which(names(crowdsimulation$Htest)=="stratsample")
n <- length(vec)
if(sum(vec) != 1) stop("Argument not valid. Insert stratsample fun in the simulation")
result <- c()
for(col in 1:n){
if(vec[col]==TRUE){
result <- c(result, 1)
}else{
result <- c(result, mean(crowdsimulation$Htest_detail[,index]/crowdsimulation$Htest_detail[,col]))
}
}
names(result) <- names(crowdsimulation$Htest)
return(result)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.