Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
374 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ src/*.dll | |
#man/*.Rd | ||
*.tar.gz | ||
inst/doc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
S3method(plotDAG,edgeList) | ||
S3method(plotDAG,sparsebnFit) | ||
S3method(plotDAG,sparsebnPath) | ||
export(estimate.covariance) | ||
export(estimate.dag) | ||
export(estimate.precision) | ||
export(plotDAG) | ||
import(ccdrAlgorithm) | ||
import(discretecdAlgorithm) | ||
import(sparsebnUtils) | ||
importFrom(grDevices,gray) | ||
importFrom(grDevices,rgb) | ||
importFrom(graphics,plot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# sparsebn 0.0.2 | ||
|
||
## Features | ||
* Added a `NEWS.md` file to track changes to the package | ||
* Added plotDAG to provide convenient default for plotting large graphs | ||
* `estimate.dag` now takes an optional logical argument `adaptive`: If `TRUE`, then an adaptive version of the CD algorithm will be run for discrete data. This argument is ignored for continuous data. | ||
* Vignette updated and re-written | ||
|
||
## Bug fixes | ||
|
||
* Cytometry data has been fixed to correct some errors in the network structure; now correctly reflects the network learned in Sachs et al. (2005) | ||
|
||
# sparsebn 0.0.1 | ||
|
||
* Initial stable release | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# | ||
# sparsebn-plotting.R | ||
# sparsebn | ||
# | ||
# Created by Bryon Aragam (local) on 10/2/16. | ||
# Copyright (c) 2016 Bryon Aragam. All rights reserved. | ||
# | ||
|
||
# | ||
# PACKAGE SPARSEBN: Default methods for plotting DAGs | ||
# | ||
# CONTENTS: | ||
# plotDAG | ||
# plotDAG.edgeList | ||
# plotDAG.sparsebnFit | ||
# plotDAG.sparsebnPath | ||
# | ||
|
||
#' Plot a DAG | ||
#' | ||
#' Using some sensible defaults for large graphs, plot a DAG object. Uses \code{\link[igraph]{igraph}} | ||
#' package by default. | ||
#' | ||
#' This method is not intended for customization. For more control over the output, use | ||
#' \code{\link{plot}} and see \code{\link{setPlotPackage}} for plotting only and/or | ||
#' \code{\link{setGraphPackage}} for even more control. These methods grants the user the full | ||
#' feature set of the selected package. | ||
#' | ||
#' @param x An \code{\link{edgeList}}, \code{\link{sparsebnFit}}, or \code{\link{sparsebnPath}} object. | ||
#' @param ... Additional arguments to \code{\link{plot}}. | ||
#' | ||
#' @export | ||
plotDAG <- function(x){ | ||
### Must use igraph for the default method | ||
current_plot_pkg <- getPlotPackage() | ||
if(current_plot_pkg != "igraph"){ | ||
err_msg <- sprintf("This method requires that the 'igraph' package be set as your plotting package. You are currently set to use the '%s' package instead. Please set this packge to be 'igraph', or use the default plot() method from the %s package instead. See ?setPlotPackage for more details.", current_plot_pkg, current_plot_pkg) | ||
stop(err_msg) | ||
} | ||
|
||
UseMethod("plotDAG", x) | ||
} | ||
|
||
#' @export | ||
plotDAG.edgeList <- function(x, ...){ | ||
|
||
# | ||
# Note that the defaults used here are not the same as for sparsebnPath! | ||
# | ||
plot(x, | ||
vertex.size = 4, | ||
vertex.label = NA, | ||
vertex.label.color = gray(0), | ||
vertex.color = rgb(1,0,0), | ||
edge.width = 1, | ||
edge.color = gray(0), | ||
edge.arrow.size = 0.5, | ||
...) | ||
} | ||
|
||
#' @export | ||
plotDAG.sparsebnFit <- function(x, ...){ | ||
plotDAG(x$edges, ...) | ||
} | ||
|
||
#' @export | ||
plotDAG.sparsebnPath <- function(x, ...){ | ||
|
||
# | ||
# This method does not delegate directly to sparsebnFit because | ||
# plotting a grid of graphs requires a different visual layout. | ||
# | ||
|
||
plot(x, | ||
vertex.size = 4, | ||
vertex.label = NA, | ||
vertex.label.color = gray(0), | ||
vertex.color = rgb(1,0,0), | ||
edge.width = 0.5, | ||
edge.color = gray(0), | ||
edge.arrow.size = 0.15, | ||
...) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,19 @@ | ||
## Test environments | ||
* local OS X install, R 3.3.1 | ||
* ubuntu 12.04 (travis-ci), R 3.3.1 | ||
* local OS X install, R 3.3.2 | ||
* ubuntu 12.04.5 (travis-ci), R 3.3.2 (oldrel, devel, and release) | ||
* win-builder (devel and release) | ||
|
||
## R CMD check results | ||
There were no ERRORs or WARNINGs. | ||
There were no ERRORs, WARNINGs, or NOTEs. | ||
|
||
There was 1 NOTE: | ||
## CRAN notes | ||
|
||
* checking CRAN incoming feasibility ... NOTE | ||
Maintainer: ‘Bryon Aragam <sparsebn@gmail.com>’ | ||
|
||
New submission | ||
|
||
This is the first version of this package that has been submitted to CRAN. | ||
|
||
## Re-submission notes | ||
- I get | ||
|
||
Reading CITATION file fails with | ||
$ operator is invalid for atomic vectors | ||
when package is not installed. | ||
|
||
Fixed by replacing packageDecription with meta as described in Section 1.9 of R-exts. | ||
The current warnings listed for v0.0.1 at https://cran.rstudio.com/web/checks/check_results_sparsebn.html are a result of recent updates to the dependencies for this submission. The current submission remedies all of these issues. | ||
|
||
## Dependencies | ||
|
||
CHECK has been run on all dependencies and passed. | ||
|
||
## Reverse dependencies | ||
|
||
This is a new release, so there are no reverse dependencies. | ||
There are no reverse dependencies. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.