Skip to content

Commit 14c00d1

Browse files
committed
Conditional logic for EpiModel version
1 parent 5985f1b commit 14c00d1

19 files changed

Lines changed: 786 additions & 475 deletions

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ r:
66
- release
77
- devel
88

9-
r_github_packages:
10-
statnet/EpiModel
11-
129
warnings_are_errors: true
1310

1411
notifications:

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: tergmLite
2-
Version: 2.2.0
3-
Date: 2020-07-20
2+
Version: 2.2.1
3+
Date: 2020-07-22
44
Title: Fast Simulation of Simple Temporal Exponential Random Graph Models
55
Authors@R: c(person("Samuel M.", "Jenness",
66
role = c("aut", "cre"),
@@ -22,7 +22,7 @@ Imports:
2222
Rcpp
2323
Suggests:
2424
testthat,
25-
EpiModel (>= 2.0.0)
25+
EpiModel (>= 1.8.0)
2626
LinkingTo: Rcpp, ergm
2727
LazyData: true
2828
RoxygenNote: 7.1.1

R/initialize.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ ergm_prep <- function(nw,
137137
#' stored under \code{nw} because it is no longer needed.
138138
#'
139139
#' @examples
140+
#' \dontrun{
140141
#' library("EpiModel")
141142
#' nw <- network_initialize(100)
142143
#' formation <- ~edges
@@ -162,6 +163,8 @@ ergm_prep <- function(nw,
162163
#'
163164
#' # ... and p (contains all relevant ERGM structural information for simulation)
164165
#' str(dat$p, max.level = 3)
166+
#' }
167+
165168
#'
166169
init_tergmLite <- function(dat) {
167170

R/simulate.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#' resimulation.
3232
#'
3333
#' @examples
34+
#' \dontrun{
3435
#' library("EpiModel")
3536
#'
3637
#' # Set seed for reproducibility
@@ -66,6 +67,7 @@
6667
#' # Specific changes listed under changes list
6768
#' # (new edges: to = 1; dissolved edges: to = 0):
6869
#' attributes(dat$el[[1]])$changes
70+
#' }
6971
#'
7072
simulate_network <- function(p,
7173
el,
@@ -252,6 +254,7 @@ ergm_Cprepare <- function(el,
252254
#' \code{dat} list object, based on the model simulation.
253255
#'
254256
#' @examples
257+
#' \dontrun{
255258
#' library("EpiModel")
256259
#'
257260
#' # Set seed for reproducibility
@@ -281,6 +284,7 @@ ergm_Cprepare <- function(el,
281284
#' el = dat$el[[1]],
282285
#' coef = dat$nwparam[[1]]$coef.form)
283286
#' dat$el[[1]]
287+
#' }
284288
#'
285289
simulate_ergm <- function(p, el, coef) {
286290

R/tergmLite-package.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#' \tabular{ll}{
55
#' Package: \tab tergmLite\cr
66
#' Type: \tab Package\cr
7-
#' Version: \tab 2.2.0\cr
8-
#' Date: \tab 2020-07-20\cr
7+
#' Version: \tab 2.2.1\cr
8+
#' Date: \tab 2020-07-22\cr
99
#' License: \tab GPL-3\cr
1010
#' LazyLoad: \tab yes\cr
1111
#' }

R/update.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#' @export
2525
#'
2626
#' @examples
27+
#' \dontrun{
2728
#' library("EpiModel")
2829
#' nw <- network_initialize(100)
2930
#' formation <- ~edges
@@ -47,6 +48,7 @@
4748
#'
4849
#' # Check new network size
4950
#' attributes(dat$el[[1]])$n
51+
#' }
5052
#'
5153
add_vertices <- function(el, nv) {
5254
attributes(el)$n <- attributes(el)$n + nv
@@ -79,6 +81,7 @@ add_vertices <- function(el, nv) {
7981
#' @export
8082
#'
8183
#' @examples
84+
#' \dontrun{
8285
#' library("EpiModel")
8386
#' set.seed(12345)
8487
#' nw <- network_initialize(100)
@@ -107,6 +110,7 @@ add_vertices <- function(el, nv) {
107110
#'
108111
#' # Newly permuted edges
109112
#' head(dat$el[[1]], 20)
113+
#' }
110114
#'
111115
delete_vertices <- function(el, vid) {
112116

R/updateModelTerms.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#' @importFrom statnet.common NVL
4141
#'
4242
#' @examples
43+
#' \dontrun{
4344
#' library("EpiModel")
4445
#'
4546
#' # Set seed for reproducibility
@@ -77,6 +78,7 @@
7778
#'
7879
#' # Check that network list structure for nodefactor term has been updated
7980
#' dat$p[[1]]$model.form$terms[[2]]
81+
#' }
8082
#'
8183
updateModelTermInputs <- function(dat, network = 1) {
8284

R/util.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#' @export
3232
#'
3333
#' @examples
34+
#' \dontrun{
3435
#' library("EpiModel")
3536
#' nw <- network_initialize(100)
3637
#' formation <- ~edges
@@ -49,6 +50,7 @@
4950
#' # Conversion to networkLite class format
5051
#' nwl <- networkLite(dat$el[[1]], dat$attr)
5152
#' nwl
53+
#' }
5254
#'
5355
networkLite <- function(el, attr) {
5456
x <- list(el = el, attr = attr, gal = attributes(el))

man/add_vertices.Rd

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

man/delete_vertices.Rd

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

0 commit comments

Comments
 (0)