Commit 2961dd1e authored by jlopez's avatar jlopez
Browse files

add doc & fix warnings

parent a3d7bfe8
......@@ -32,5 +32,7 @@ vignettes/*.pdf
*.utf8.md
*.knit.md
*.o
*.so
.Rproj.user
......@@ -15,6 +15,9 @@
#' @param na integer :
#' @param natba integer : Min nb of genotype copies to consider this genotype as advantageous
#' @param nbreps integer :
#' @param have_rescuers logical : if you want rescuers file
#' @param have_rate logical : if you want rate file (you need have_rescuers=TRUE)
#' @param output_path string : the output path
#' @param verbose logical : if you want a verbose program
#' @return array :
simulation <- function(max_geno = 500, range = c(-0.05, -0.1, -0.15),
......@@ -146,7 +149,7 @@ Rbuiltlandscape <- function(n, ne, Es, so, na)
xo <- numeric(n)
if (so != 0) { #if so = 0, all the genotypic values stay at 0
x1 <- rnorm(n)
xo <- x1 * sqrt(2 * so / (t(x1) %*% S %*% x1) )
xo <- x1 * as.vector(sqrt(2 * so / (t(x1) %*% S %*% x1) ))
}
return(list(M=M, Sb=S, A=A, xo=xo))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment