Skip to content

Commit 4c4c6fb

Browse files
committed
Fixing slow examples
1 parent 7b11446 commit 4c4c6fb

9 files changed

Lines changed: 43 additions & 20 deletions

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
^\.Rproj\.user$
33
^LICENSE\.md$
44
^README.Rmd
5+
^cran-comments\.md$

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Package: gnonadd
22
Type: Package
33
Title: Various Non-Additive Models for Genetic Associations
4-
Version: 1.0.0
4+
Version: 1.0.1
55
Authors@R: c(
66
person("Audunn S.", "Snaebjarnarson", , "audunn.snaebjarnarson@decode.is", role = c("aut", "cre")),
77
person("Gudmundur", "Einarsson", , "gudmundur.einarsson2@decode.is", role = c("aut")),
88
person("Daniel F.", "Gudbjartsson", , "daniel.gudbjartsson@decode.is", role = c("aut"))
99
)
1010
Description: The goal of gnonadd is to simplify workflows in the analysis of non-additive effects of
1111
sequence variants. This includes variance effects, correlation effects, interaction
12-
effects and dominance effects.
12+
effects and dominance effects. The package also includes convenience functions for visualization.
1313
License: MIT + file LICENSE
1414
Encoding: UTF-8
1515
LazyData: true

R/Env_interaction_CaseControl_all_vs_all.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@
1818
#' @returns
1919
#' A dataframe with all possible variant-environmental pairs and their estimated interaction effect
2020
#' @examples
21-
#' g_vec <- matrix(0, nrow = 100000, ncol = 3)
21+
#' N_run <- 50000
22+
#' g_vec <- matrix(0, nrow = N_run, ncol = 3)
2223
#' freqs <- runif(ncol(g_vec), min = 0, max = 1)
23-
#' env_vec <- matrix(0, nrow = 100000, ncol = 3)
24+
#' env_vec <- matrix(0, nrow = N_run, ncol = 3)
2425
#' for(i in 1:ncol(g_vec)){
25-
#' g_vec[, i] <- rbinom(100000, 2, freqs[i])
26+
#' g_vec[, i] <- rbinom(N_run, 2, freqs[i])
2627
#' }
2728
#' for( i in 1:ncol(env_vec)){
28-
#' env_vec[, i] <- round(runif(100000,min=0,max=6))
29+
#' env_vec[, i] <- round(runif(N_run,min=0,max=6))
2930
#' }
30-
#' cc_vec <- rbinom(100000,1,0.1 * (1.05 ^ g_vec[, 1]) *
31+
#' cc_vec <- rbinom(N_run,1,0.1 * (1.05 ^ g_vec[, 1]) *
3132
#' (1.06 ^ env_vec[,1]) * (0.95 ^ g_vec[, 2]) *
3233
#' (1.1^(g_vec[, 1] * env_vec[, 1])))
3334
#' res <- pairwise_env_int_CC.calc(cc_vec, g_vec, env_vec)

R/Interactions_CaseControl_all_vs_all.R

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
#' @returns
1616
#' A dataframe with all possible variant pairs and their estimated interaction effect
1717
#' @examples
18-
#' g_vec <- matrix(0, nrow = 100000, ncol = 5)
18+
#' N_run <- 50000
19+
#' g_vec <- matrix(0, nrow = N_run, ncol = 5)
1920
#' freqs <- runif(ncol(g_vec), min = 0,max = 1)
2021
#' for(i in 1:ncol(g_vec)){
21-
#' g_vec[, i] <- rbinom(100000, 2, freqs[i])
22+
#' g_vec[, i] <- rbinom(N_run, 2, freqs[i])
2223
#' }
23-
#' cc_vec <- rbinom(100000,1,0.1 * (1.05 ^ g_vec[, 1]) *
24+
#' cc_vec <- rbinom(N_run,1,0.1 * (1.05 ^ g_vec[, 1]) *
2425
#' (1.06 ^ g_vec[,2]) * (0.95 ^ g_vec[, 3]) *
2526
#' (1.5^(g_vec[,1] * g_vec[,2])))
2627
#' res <- pairwise_int_CC.calc(cc_vec, g_vec)

README.Rmd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,15 @@ A more detailed description will be added with further development.
5353

5454
## Installation
5555

56-
You can install the package via the `remotes` package:
56+
You can install the latest version of the package via the `remotes` package:
5757

5858
```{r, eval = FALSE}
5959
# Use remotes:
6060
remotes::install_github("DecodeGenetics/gnonadd")
6161
```
62+
63+
When the package is on CRAN, you should be able to install it with:
64+
65+
```{r, eval = FALSE}
66+
install.packages("gnonadd")
67+
```

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,16 @@ A more detailed description will be added with further development.
4646

4747
## Installation
4848

49-
You can install the package via the `remotes` package:
49+
You can install the latest version of the package via the `remotes`
50+
package:
5051

5152
``` r
5253
# Use remotes:
5354
remotes::install_github("DecodeGenetics/gnonadd")
5455
```
56+
57+
When the package is on CRAN, you should be able to install it with:
58+
59+
``` r
60+
install.packages("gnonadd")
61+
```

cran-comments.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## R CMD check results
2+
3+
0 errors | 0 warnings | 1 note
4+
5+
* This is a new release. Gudmundur Einarsson has published two packages to CRAN.

man/pairwise_env_int_CC.calc.Rd

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/pairwise_int_CC.calc.Rd

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)