Skip to content

Commit

Permalink
fixes to documentation + added vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
gi0na committed Jan 15, 2019
1 parent 257f29a commit 3b000ec
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 14 deletions.
30 changes: 21 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
Package: hypernets
Type: Package
Title: Generalised Hypergeometric Network Ensembles
Version: 0.1.15012019
Date: as.POSIXlt(2019-01-15)
Authors@R: person("Giona", "Casiraghi", email = "giona@ethz.ch",
role = c("aut", "cre"))
Maintainer: Giona Casiraghi <giona@ethz.ch>
Description: R implementation for ...
Depends: R (>= 2.10)
Title: An implementation of the Generalised Hypergeometric Ensemble of Random Graphs
Version: 0.3.16012019
Date: as.POSIXlt(2019-01-16)
Authors@R: c(
person("Giona", "Casiraghi", email = "giona@ethz.ch",
role = c("aut", "cre")),
person("Vahan", "Nanumyan", email = "vahan@ethz.ch",
role = c('aut'))
)
URL: https://ghyper.net
Description: An implementation of the Generalised Hypergeometric Ensemble of Random Graphs.
It provides functions for model fitting and selection of gHypEGs.
The package is based on the research developed at the Chair of Systems Design, ETH Zurich.
1. Casiraghi, G., Nanumyan, V., Scholtes, I., Schweitzer, F. Generalized Hypergeometric Ensembles: Statistical Hypothesis Testing in Complex Networks. arXiv Prepr. arXiv1607.02441 (2016). at <http://arxiv.org/abs/1607.02441>
2. Casiraghi, G., Nanumyan, V., Scholtes, I., Schweitzer, F. in 111-120 (Springer Verlag, 2017). doi:10.1007/978-3-319-67256-4_11
3. Casiraghi, G., Nanumyan, V. Generalised hypergeometric ensembles of random graphs: the configuration model as an urn problem. (2018). at <http://arxiv.org/abs/1810.06495>
4. Casiraghi, G. Analytical Formulation of the Block-Constrained Configuration Model. (2018). at <http://arxiv.org/abs/1811.05337>
Depends: R (>= 3.3.1)
License: AGPL-3
Imports: parallel,
plyr,
numbers
Suggests: BiasedUrn, igraph
Suggests: BiasedUrn, igraph, knitr, rmarkdown
VignetteBuilder: knitr
Encoding: UTF-8
RoxygenNote: 6.1.0
4 changes: 2 additions & 2 deletions R/tests.R
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ isNetwork <- function(graph, directed, selfloops, Beta=NULL, nempirical=NULL, pa
#' @param graph an adjacency matrix or a igraph object.
#' @param model a ghype model
#' @param under boolean, estimate under-represented deviations? Default FALSE.
#' @log.p boolean, return log values of probabilities
#' @param log.p boolean, return log values of probabilities
#'
#' @return
#'
Expand Down Expand Up @@ -326,7 +326,7 @@ linkSignificance <- function(graph, model, under=FALSE, log.p=FALSE, binomial.ap
)
} else{

if( ((mean(xibar)/sum(graph[idx]))<1e3) & (!binomial.approximation) ){
if( requireNamespace("BiasedUrn", quietly = TRUE) && (((mean(xibar)/sum(graph[idx]))<1e3) & (!binomial.approximation)) ){
probvec[id] <- Vectorize(FUN = BiasedUrn::pWNCHypergeo, vectorize.args = c('x', 'm1', 'm2','n','odds'))(
x = graph[idx][id],m1 = model$xi[idx][id],m2 = xibar[id],
n = sum(graph[idx]), odds = model$omega[idx][id]/omegabar[id],
Expand Down
2 changes: 1 addition & 1 deletion man/CreateIgGraphs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/linkSignificance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
title: "Finding Significant Links with Hypernets"
author: "Giona CasiraghI"
date: "20/4/2018"
output: html_document
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Finding Significant Links with Hypernets}
%\VignetteEngine{knitr::rmarkdown}
\usepackage[utf8]{inputenc}
---

```{r setup, include=FALSE}
Expand Down
File renamed without changes.

0 comments on commit 3b000ec

Please sign in to comment.