Skip to content

Commit 6e4f418

Browse files
Merge branch 'release-v0_0_3' into dev
2 parents 7c903b8 + 5f9a285 commit 6e4f418

File tree

7 files changed

+66
-74
lines changed

7 files changed

+66
-74
lines changed

R/ccdrAlgorithm-main.R

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,25 +58,22 @@ NULL
5858
#'
5959
#' @examples
6060
#'
61-
#' \dontrun{
62-
#'
6361
#' ### Generate some random data
6462
#' dat <- matrix(rnorm(1000), nrow = 20)
65-
#' dat <- sparsebnData(dat, type = "continuous")
63+
#' dat <- sparsebnUtils::sparsebnData(dat, type = "continuous")
6664
#'
6765
#' # Run with default settings
68-
#' ccdr.run(data = dat)
66+
#' ccdr.run(data = dat, lambdas.length = 20)
6967
#'
7068
#' ### Optional: Adjust settings
71-
#' pp <- ncol(dat)
69+
#' pp <- ncol(dat$data)
7270
#'
7371
#' # Initialize algorithm with a random initial value
7472
#' init.betas <- matrix(0, nrow = pp, ncol = pp)
7573
#' init.betas[1,2] <- init.betas[1,3] <- init.betas[4,2] <- 1
7674
#'
7775
#' # Run with adjusted settings
78-
#' ccdr.run(data = dat, betas = init.betas, lambdas.length = 10, alpha = 10, verbose = TRUE)
79-
#' }
76+
#' ccdr.run(data = dat, betas = init.betas, lambdas.length = 20, alpha = 10, verbose = TRUE)
8077
#'
8178
#' @export
8279
ccdr.run <- function(data,
@@ -223,6 +220,7 @@ ccdr_call <- function(data,
223220
# Still need to set start = 0, though.
224221
betas$start <- 0
225222
} # Type-checking for betas happens in ccdr_singleR
223+
226224
# This parameter can be set by the user, but in order to prevent the algorithm from taking too long to run
227225
# it is a good idea to keep the threshold used by default which is O(sqrt(pp))
228226
if(is.null(max.iters)){

R/ccdrAlgorithm-mvn.R

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@
2222
#' @param ivn List of interventions (see \code{\link[sparsebnUtils]{sparsebnData}}). Must be a \code{list} with exactly \code{n} components.
2323
#' @param ivn.rand If \code{TRUE}, random N(0,1) values will be drawn for each intervention. Otherwise, these values need to supplied manually in \code{ivn}.
2424
#'
25+
#' @examples
26+
#'
27+
#' ### Generate observational data
28+
#' gr <- sparsebnUtils::random.graph(5, 5) # use sparsebnUtils package to generate a random graph
29+
#' gr.params <- runif(10) # there are 5 coefficients + 5 variances
30+
#' data.obs <- ccdrAlgorithm::generate_mvn_data(graph = gr,
31+
#' n = 100,
32+
#' params = gr.params)
33+
#'
34+
#' ### Generate experimental data
35+
#' ivn <- as.list(c(rep("V1", 50), rep("V2", 50))) # 50 interventions on V1, 50 interventions on V2
36+
#' data.ivn <- ccdrAlgorithm::generate_mvn_data(graph = gr,
37+
#' n = 100,
38+
#' params = gr.params,
39+
#' ivn = ivn)
40+
#'
2541
#' @export
2642
generate_mvn_data <- function(graph, params, n = 1, ivn = NULL, ivn.rand = TRUE){
2743

man/ccdr.run.Rd

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

man/generate_mvn_data.Rd

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

revdep/README.md

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,35 @@
44

55
|setting |value |
66
|:--------|:----------------------------|
7-
|version |R version 3.3.2 (2016-10-31) |
7+
|version |R version 3.3.3 (2017-03-06) |
88
|system |x86_64, darwin13.4.0 |
99
|ui |RStudio (1.0.44) |
1010
|language |(EN) |
1111
|collate |en_US.UTF-8 |
1212
|tz |America/New_York |
13-
|date |2016-11-19 |
13+
|date |2017-03-09 |
1414

1515
## Packages
1616

17-
|package |* |version |date |source |
18-
|:-------------|:--|:-------|:----------|:---------------------------------------------|
19-
|ccdrAlgorithm |* |0.0.2 |2016-11-19 |local (itsrainingdata/ccdrAlgorithm@NA) |
20-
|Rcpp | |0.12.8 |2016-11-17 |cran (@0.12.8) |
21-
|sparsebnUtils |* |0.0.2 |2016-11-19 |Github (itsrainingdata/sparsebnUtils@db676a0) |
17+
|package |* |version |date |source |
18+
|:-------------|:--|:-------|:----------|:---------------------------------------|
19+
|ccdrAlgorithm | |0.0.3 |2017-03-09 |local (itsrainingdata/ccdrAlgorithm@NA) |
2220

2321
# Check results
2422
1 packages
2523

26-
## sparsebn (0.0.1)
24+
## sparsebn (0.0.2)
2725
Maintainer: Bryon Aragam <sparsebn@gmail.com>
2826
Bug reports: https://github.com/itsrainingdata/sparsebn/issues
2927

3028
0 errors | 1 warning | 0 notes
3129

3230
```
33-
checking re-building of vignette outputs ... WARNING
34-
Error in re-building vignettes:
35-
...
36-
Loading required package: sparsebnUtils
37-
Loading required package: ccdrAlgorithm
38-
Loading required package: discretecdAlgorithm
39-
40-
sparsebn v0.0.1, Copyright (c) 2016
41-
Bryon Aragam, University of California, Los Angeles
42-
Jiaying Gu, University of California, Los Angeles
43-
... 6 lines ...
44-
---> Bugs? Please report any bugs at https://github.com/itsrainingdata/sparsebn/issues.
45-
46-
A list of interventions was not specified: Assuming data is purely observational.
47-
Note: method with signature 'ddiMatrix#dMatrix' chosen for function '-',
48-
target signature 'ddiMatrix#dtCMatrix'.
49-
"diagonalMatrix#triangularMatrix" would also be valid
50-
A list of interventions was not specified: Assuming data is purely observational.
51-
Quitting from lines 144-153 (sparsebn-vignette.Rmd)
52-
Error: processing vignette 'sparsebn-vignette.Rmd' failed with diagnostics:
53-
could not find function "get.solution"
54-
Execution halted
31+
checking Rd cross-references ... WARNING
32+
Missing link or links in documentation object 'estimate.dag.Rd':
33+
‘[discretecdAlgorithm]{cd.run}’
34+
35+
See section 'Cross-references' in the 'Writing R Extensions' manual.
36+
5537
```
5638

revdep/checks.rds

-410 Bytes
Binary file not shown.

revdep/problems.md

Lines changed: 12 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,53 +4,35 @@
44

55
|setting |value |
66
|:--------|:----------------------------|
7-
|version |R version 3.3.2 (2016-10-31) |
7+
|version |R version 3.3.3 (2017-03-06) |
88
|system |x86_64, darwin13.4.0 |
99
|ui |RStudio (1.0.44) |
1010
|language |(EN) |
1111
|collate |en_US.UTF-8 |
1212
|tz |America/New_York |
13-
|date |2016-11-19 |
13+
|date |2017-03-09 |
1414

1515
## Packages
1616

17-
|package |* |version |date |source |
18-
|:-------------|:--|:-------|:----------|:---------------------------------------------|
19-
|ccdrAlgorithm |* |0.0.2 |2016-11-19 |local (itsrainingdata/ccdrAlgorithm@NA) |
20-
|Rcpp | |0.12.8 |2016-11-17 |cran (@0.12.8) |
21-
|sparsebnUtils |* |0.0.2 |2016-11-19 |Github (itsrainingdata/sparsebnUtils@db676a0) |
17+
|package |* |version |date |source |
18+
|:-------------|:--|:-------|:----------|:---------------------------------------|
19+
|ccdrAlgorithm | |0.0.3 |2017-03-09 |local (itsrainingdata/ccdrAlgorithm@NA) |
2220

2321
# Check results
2422
1 packages with problems
2523

26-
## sparsebn (0.0.1)
24+
## sparsebn (0.0.2)
2725
Maintainer: Bryon Aragam <sparsebn@gmail.com>
2826
Bug reports: https://github.com/itsrainingdata/sparsebn/issues
2927

3028
0 errors | 1 warning | 0 notes
3129

3230
```
33-
checking re-building of vignette outputs ... WARNING
34-
Error in re-building vignettes:
35-
...
36-
Loading required package: sparsebnUtils
37-
Loading required package: ccdrAlgorithm
38-
Loading required package: discretecdAlgorithm
39-
40-
sparsebn v0.0.1, Copyright (c) 2016
41-
Bryon Aragam, University of California, Los Angeles
42-
Jiaying Gu, University of California, Los Angeles
43-
... 6 lines ...
44-
---> Bugs? Please report any bugs at https://github.com/itsrainingdata/sparsebn/issues.
45-
46-
A list of interventions was not specified: Assuming data is purely observational.
47-
Note: method with signature 'ddiMatrix#dMatrix' chosen for function '-',
48-
target signature 'ddiMatrix#dtCMatrix'.
49-
"diagonalMatrix#triangularMatrix" would also be valid
50-
A list of interventions was not specified: Assuming data is purely observational.
51-
Quitting from lines 144-153 (sparsebn-vignette.Rmd)
52-
Error: processing vignette 'sparsebn-vignette.Rmd' failed with diagnostics:
53-
could not find function "get.solution"
54-
Execution halted
31+
checking Rd cross-references ... WARNING
32+
Missing link or links in documentation object 'estimate.dag.Rd':
33+
‘[discretecdAlgorithm]{cd.run}’
34+
35+
See section 'Cross-references' in the 'Writing R Extensions' manual.
36+
5537
```
5638

0 commit comments

Comments
 (0)