Commit cf0cd653 authored by Rauschenberger's avatar Rauschenberger
Browse files

automation

parent 8b2c7f9b
......@@ -888,12 +888,13 @@ test.multiple <- function(Y,X,map,rho=c(0,0.5,1),spec=1,min=100,steps=20){
if(TRUE){
max <- p/0.05+1
limit <- ceiling(0.05*max/p)
steps <- diff(limit^seq(from=log(min),to=log(max)/log(limit),length.out=pmin(p,steps)))
steps <- diff(limit^seq(from=log(min),to=log(max)/log(limit),length.out=steps)) # was pmin(p,steps)
steps[steps<min] <- min
for(i in 1:10){
cond <- steps>10^i & steps<10^(i+1)
steps[cond] <- ceiling(steps[cond]/10^i)*10^i
}
#for(i in 1:10){
# cond <- steps>10^i & steps<10^(i+1)
# steps[cond] <- ceiling(steps[cond]/10^i)*10^i
#}
steps = signif(steps,digits=1)
steps <- steps[cumsum(steps)<=max]
steps[length(steps)+1] <- max-sum(steps)
}
......
Markdown is supported
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