Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Armin Rauschenberger
joinet
Commits
cf0cd653
Commit
cf0cd653
authored
Jul 28, 2018
by
Rauschenberger
Browse files
automation
parent
8b2c7f9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/functions.R
View file @
cf0cd653
...
...
@@ -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
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment