diff --git a/DESCRIPTION b/DESCRIPTION index 6c36e9b..df14a97 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,8 @@ Imports: dplyr, survey, stats, - methods + methods, + statnet.data Suggests: testthat (>= 2.1.1), covr (>= 3.2.1) @@ -33,7 +34,7 @@ Description: Utilities for managing egocentrically sampled network data and a wr License: GPL-3 + file LICENSE URL: https://statnet.org BugReports: https://github.com/statnet/ergm.ego/issues -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 Roxygen: list(markdown = TRUE) Encoding: UTF-8 Remotes: @@ -41,4 +42,5 @@ Remotes: github::statnet/statnet.common@master, github::statnet/network@master, github::statnet/ergm@master, - github::tilltnet/egor + github::tilltnet/egor, + github::statnet/statnet.data diff --git a/R/EgoStat.node.attr.R b/R/EgoStat.node.attr.R index ae526e5..416d51b 100644 --- a/R/EgoStat.node.attr.R +++ b/R/EgoStat.node.attr.R @@ -82,7 +82,7 @@ NULL #' combination. #' #' @examples -#' data(florentine) +#' data(flomarriage, package="statnet.data") #' flomego <- as.egor(flomarriage) #' ergm.ego_get_vattr("priorates", flomego) #' ergm.ego_get_vattr(~priorates, flomego) diff --git a/R/degreedist.R b/R/degreedist.R index 0050a2d..da33ada 100644 --- a/R/degreedist.R +++ b/R/degreedist.R @@ -40,7 +40,7 @@ #' \code{\link[ergm:summary_formula]{summary}} #' @examples #' -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- as.egor(faux.mesa.high) #' #' degreedist(fmh.ego,by="Grade",brgmod=TRUE) @@ -177,7 +177,7 @@ degreedist.egor <- function(object, freq = FALSE, prob = !freq, #' \code{\link[ergm.ego]{summary}} method for egocentric data #' @examples #' -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- as.egor(faux.mesa.high) #' #' (mm <- mixingmatrix(faux.mesa.high,"Grade")) diff --git a/R/egor.R b/R/egor.R index b3fca2b..b830091 100644 --- a/R/egor.R +++ b/R/egor.R @@ -117,7 +117,7 @@ as.egor.network<-function(x,special.cols=c("na"),...){ #' @examples #' #' -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' summary(faux.mesa.high, print.adj = FALSE) #' #' fmh.ego <- as.egor(faux.mesa.high) @@ -211,7 +211,7 @@ na.omit.egor <- function(object, relevant=TRUE, ...){ #' #' @examples #' -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- as.egor(faux.mesa.high) #' #' # Create a tiny weighted sample: diff --git a/R/ergm.ego.R b/R/ergm.ego.R index 33443be..86ba4de 100644 --- a/R/ergm.ego.R +++ b/R/ergm.ego.R @@ -84,7 +84,7 @@ #' @seealso \code{\link[ergm]{ergm}()} #' @examples #' \donttest{ -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- as.egor(faux.mesa.high) #' #' head(fmh.ego) diff --git a/R/fmhfit.R b/R/fmhfit.R index acb9cff..02f9f77 100644 --- a/R/fmhfit.R +++ b/R/fmhfit.R @@ -19,7 +19,7 @@ #' #' @examples #' \dontrun{ -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- egor::as.egor(faux.mesa.high) #' fmhfit <- ergm.ego( #' fmh.ego ~ edges + degree(0:3) + diff --git a/R/gof.ergm.ego.R b/R/gof.ergm.ego.R index f7f4b81..f5d8091 100644 --- a/R/gof.ergm.ego.R +++ b/R/gof.ergm.ego.R @@ -105,7 +105,7 @@ #' @keywords models #' @examples #' \donttest{ -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- as.egor(faux.mesa.high) #' #' head(fmh.ego) diff --git a/R/simulate.ergm.ego.R b/R/simulate.ergm.ego.R index 3b01bc1..4d630f6 100644 --- a/R/simulate.ergm.ego.R +++ b/R/simulate.ergm.ego.R @@ -53,7 +53,7 @@ #' @keywords models #' @examples #' -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- as.egor(faux.mesa.high) #' data(fmhfit) #' colMeans(egosim <- simulate(fmhfit, popsize=300,nsim=50, diff --git a/R/summary.statistics.egor.R b/R/summary.statistics.egor.R index d69748f..207779f 100644 --- a/R/summary.statistics.egor.R +++ b/R/summary.statistics.egor.R @@ -47,7 +47,7 @@ #' #' @examples #' -#' data(faux.mesa.high) +#' data(faux.mesa.high, package="statnet.data") #' fmh.ego <- as.egor(faux.mesa.high) #' (nw.summ <- summary(faux.mesa.high~edges+degree(0:3)+nodematch("Race")+ #' nodematch("Sex")+absdiff("Grade")+nodemix("Grade"))) diff --git a/data-raw/fmhfit.R b/data-raw/fmhfit.R index deb68a7..5838d88 100644 --- a/data-raw/fmhfit.R +++ b/data-raw/fmhfit.R @@ -1,6 +1,6 @@ library(ergm.ego) -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- egor::as.egor(faux.mesa.high) fmhfit <- ergm.ego( fmh.ego ~ edges + degree(0:3) + diff --git a/man/degreedist.egor.Rd b/man/degreedist.egor.Rd index 024e77d..a4f0e7c 100644 --- a/man/degreedist.egor.Rd +++ b/man/degreedist.egor.Rd @@ -53,7 +53,7 @@ graph. } \examples{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) degreedist(fmh.ego,by="Grade",brgmod=TRUE) diff --git a/man/ergm.ego.Rd b/man/ergm.ego.Rd index e95d899..878d890 100644 --- a/man/ergm.ego.Rd +++ b/man/ergm.ego.Rd @@ -83,7 +83,7 @@ A wrapper around the \code{\link[ergm]{ergm}} to fit an ERGM to an } \examples{ \donttest{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) head(fmh.ego) diff --git a/man/fmhfit.Rd b/man/fmhfit.Rd index ba71311..eb39db3 100644 --- a/man/fmhfit.Rd +++ b/man/fmhfit.Rd @@ -13,7 +13,7 @@ shown below in the Examples section. } \examples{ \dontrun{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- egor::as.egor(faux.mesa.high) fmhfit <- ergm.ego( fmh.ego ~ edges + degree(0:3) + diff --git a/man/gof.ergm.ego.Rd b/man/gof.ergm.ego.Rd index 9b34881..90f6851 100644 --- a/man/gof.ergm.ego.Rd +++ b/man/gof.ergm.ego.Rd @@ -48,7 +48,7 @@ An enhanced plotting method is also provided, giving uncertainty bars for the ob } \examples{ \donttest{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) head(fmh.ego) diff --git a/man/mixingmatrix.egor.Rd b/man/mixingmatrix.egor.Rd index c026662..fda710f 100644 --- a/man/mixingmatrix.egor.Rd +++ b/man/mixingmatrix.egor.Rd @@ -36,7 +36,7 @@ of each group nominates an alter of each group. } \examples{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) (mm <- mixingmatrix(faux.mesa.high,"Grade")) diff --git a/man/nodal_attributes-API.Rd b/man/nodal_attributes-API.Rd index d55e1ba..2bfef13 100644 --- a/man/nodal_attributes-API.Rd +++ b/man/nodal_attributes-API.Rd @@ -164,7 +164,7 @@ beconverted to character).} }} \examples{ -data(florentine) +data(flomarriage, package="statnet.data") flomego <- as.egor(flomarriage) ergm.ego_get_vattr("priorates", flomego) ergm.ego_get_vattr(~priorates, flomego) diff --git a/man/sample.Rd b/man/sample.Rd index f1b30ae..4dd4e5f 100644 --- a/man/sample.Rd +++ b/man/sample.Rd @@ -33,7 +33,7 @@ data-frame-alikes as arguments. } \examples{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) # Create a tiny weighted sample: diff --git a/man/simulate.ergm.ego.Rd b/man/simulate.ergm.ego.Rd index 39f2c16..adf0d84 100644 --- a/man/simulate.ergm.ego.Rd +++ b/man/simulate.ergm.ego.Rd @@ -54,7 +54,7 @@ from an ERGM fit using \code{\link{ergm.ego}}. } \examples{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) data(fmhfit) colMeans(egosim <- simulate(fmhfit, popsize=300,nsim=50, diff --git a/man/summary_formula.egor.Rd b/man/summary_formula.egor.Rd index e37a242..ab7c29a 100644 --- a/man/summary_formula.egor.Rd +++ b/man/summary_formula.egor.Rd @@ -53,7 +53,7 @@ Used to calculate the specified network statistics inferred from a \examples{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) (nw.summ <- summary(faux.mesa.high~edges+degree(0:3)+nodematch("Race")+ nodematch("Sex")+absdiff("Grade")+nodemix("Grade"))) diff --git a/man/template_network.Rd b/man/template_network.Rd index 14b02fd..7234359 100644 --- a/man/template_network.Rd +++ b/man/template_network.Rd @@ -35,7 +35,7 @@ taking into accounts their sampling weights. \examples{ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") summary(faux.mesa.high, print.adj = FALSE) fmh.ego <- as.egor(faux.mesa.high) diff --git a/tests/testthat/test-boot_jack.R b/tests/testthat/test-boot_jack.R index 694efcf..31de725 100644 --- a/tests/testthat/test-boot_jack.R +++ b/tests/testthat/test-boot_jack.R @@ -8,7 +8,7 @@ # Copyright 2015-2021 Statnet Commons ################################################################################ -data(faux.mesa.high) +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) diff --git a/tests/testthat/test-coef_recovery.R b/tests/testthat/test-coef_recovery.R index 0f0050d..c6e9474 100644 --- a/tests/testthat/test-coef_recovery.R +++ b/tests/testthat/test-coef_recovery.R @@ -10,7 +10,7 @@ test_that("complete ERGM and ergm.ego() give similar coef estimates",{ ergm.ego:::long_test() - data(faux.mesa.high) + data(faux.mesa.high, package="statnet.data") fmh.ego <- egor::as.egor(faux.mesa.high) fit <- ergm( diff --git a/tests/testthat/test-degreedist.R b/tests/testthat/test-degreedist.R index 284c3fc..4294302 100644 --- a/tests/testthat/test-degreedist.R +++ b/tests/testthat/test-degreedist.R @@ -69,7 +69,7 @@ test_that("degreedist() works on egor::egor32 data with `by=sex` (a factor)", { # Tests using ergm::faux.mesa.high data ----------------------------------- -data(faux.mesa.high, package="ergm") +data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) test_that("degreedist() works on data based on faux.mesa.high", { diff --git a/tests/testthat/test-gof.ergm.ego.R b/tests/testthat/test-gof.ergm.ego.R index 9844807..2c53c40 100644 --- a/tests/testthat/test-gof.ergm.ego.R +++ b/tests/testthat/test-gof.ergm.ego.R @@ -58,7 +58,7 @@ test_that("GOF='espartners' works", { test_that("GOF='espartners' works if `esp` term is in the model", { - data("faux.mesa.high", package="ergm") + data("faux.mesa.high", package="statnet.data") edata <- as.egor(faux.mesa.high) fit <- ergm.ego( edata ~ edges + esp(1), diff --git a/tests/testthat/test-mixingmatrix.R b/tests/testthat/test-mixingmatrix.R index 255a529..3d39a9b 100644 --- a/tests/testthat/test-mixingmatrix.R +++ b/tests/testthat/test-mixingmatrix.R @@ -79,7 +79,7 @@ for ( v in varnames ) { # }) test_that("mixing matrices for FMH and egoFMH are equivalent", { - data("faux.mesa.high") + data("faux.mesa.high", package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) expect_equal( { diff --git a/tests/testthat/test-netsize.adj.R b/tests/testthat/test-netsize.adj.R index 654aa20..6d2e668 100644 --- a/tests/testthat/test-netsize.adj.R +++ b/tests/testthat/test-netsize.adj.R @@ -7,7 +7,7 @@ # # Copyright 2015-2021 Statnet Commons ################################################################################ -data(sampson, package="ergm") +data(samplike, package="statnet.data") for(i in 1:10) { set.seed(i) @@ -30,7 +30,7 @@ for(i in 1:10) { }) } -data(faux.mesa.high, package="ergm") +data(faux.mesa.high, package="statnet.data") for(i in 1:10) { set.seed(i) diff --git a/tests/testthat/test-predict.ergm.ego.R b/tests/testthat/test-predict.ergm.ego.R index e26b787..213b917 100644 --- a/tests/testthat/test-predict.ergm.ego.R +++ b/tests/testthat/test-predict.ergm.ego.R @@ -11,7 +11,7 @@ library(ergm.ego) test_that("it just works for model without offsets", { - data(faux.mesa.high, package="ergm") + data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) egofit <- ergm.ego( fmh.ego~edges+degree(0:3)+nodefactor("Race")+nodematch("Race") @@ -26,7 +26,7 @@ test_that("it just works for model without offsets", { test_that("it just works for model with offsets", { - data("faux.mesa.high", package="ergm") + data("faux.mesa.high", package="statnet.data") fmhego <- as.egor(faux.mesa.high) fit <- ergm.ego( fmhego ~ edges diff --git a/tests/testthat/test-table_ppop.R b/tests/testthat/test-table_ppop.R index 9b38f32..8f101d8 100644 --- a/tests/testthat/test-table_ppop.R +++ b/tests/testthat/test-table_ppop.R @@ -11,7 +11,7 @@ test_that("estimation works", { skip("Not yet fixed") - data(faux.mesa.high) + data(faux.mesa.high, package="statnet.data") fmh.ego <- as.egor(faux.mesa.high) ppop <- rbind(fmh.ego, fmh.ego) ppop$.alts <- NULL