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

add doc & fix warnings

parent a3d7bfe8
...@@ -32,5 +32,7 @@ vignettes/*.pdf ...@@ -32,5 +32,7 @@ vignettes/*.pdf
*.utf8.md *.utf8.md
*.knit.md *.knit.md
*.o
*.so
.Rproj.user .Rproj.user
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
#' @param na integer : #' @param na integer :
#' @param natba integer : Min nb of genotype copies to consider this genotype as advantageous #' @param natba integer : Min nb of genotype copies to consider this genotype as advantageous
#' @param nbreps integer : #' @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 #' @param verbose logical : if you want a verbose program
#' @return array : #' @return array :
simulation <- function(max_geno = 500, range = c(-0.05, -0.1, -0.15), simulation <- function(max_geno = 500, range = c(-0.05, -0.1, -0.15),
...@@ -146,7 +149,7 @@ Rbuiltlandscape <- function(n, ne, Es, so, na) ...@@ -146,7 +149,7 @@ Rbuiltlandscape <- function(n, ne, Es, so, na)
xo <- numeric(n) xo <- numeric(n)
if (so != 0) { #if so = 0, all the genotypic values stay at 0 if (so != 0) { #if so = 0, all the genotypic values stay at 0
x1 <- rnorm(n) 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)) 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