diff --git a/DESCRIPTION b/DESCRIPTION index 340f5408..2577d638 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: migraph Title: Multimodal and Multilevel Network Analysis -Version: 0.10.1 -Date: 2022-06-17 +Version: 0.10.2 +Date: 2022-06-20 Description: A set of tools that extend common social network analysis packages for analysing multimodal and multilevel networks. It includes functions for one- and two-mode (and sometimes three-mode) diff --git a/NEWS.md b/NEWS.md index ae61d663..e0fe52dd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# migraph 0.10.2 + +## Memberships + +- Further shortened equivalence examples + # migraph 0.10.1 ## Measures @@ -7,7 +13,7 @@ ## Memberships -- Trimmed equivalence examples +- Shortened equivalence examples # migraph 0.10.0 diff --git a/R/member_equivalence.R b/R/member_equivalence.R index 694870cc..40148231 100644 --- a/R/member_equivalence.R +++ b/R/member_equivalence.R @@ -82,9 +82,8 @@ node_equivalence <- function(object, census, #' @describeIn equivalence Returns nodes' membership in #' structurally equivalent classes #' @examples -#' (nse_conc <- node_structural_equivalence(ison_southern_women, -#' cluster = "concor")) -#' plot(nse_conc) +#' (nse <- node_structural_equivalence(mpn_elite_usa_advice)) +#' plot(nse) #' @export node_structural_equivalence <- function(object, k = c("silhouette", "elbow", "strict"), @@ -102,9 +101,6 @@ node_structural_equivalence <- function(object, #' @describeIn equivalence Returns nodes' membership in #' regularly equivalent classes -#' @examples -#' (nre <- node_regular_equivalence(ison_algebra, "elbow")) -#' plot(nre) #' @export node_regular_equivalence <- function(object, k = c("silhouette", "elbow", "strict"), @@ -124,9 +120,6 @@ node_regular_equivalence <- function(object, #' @describeIn equivalence Returns nodes' membership in #' automorphically equivalent classes -#' @examples -#' (nae <- node_automorphic_equivalence(mpn_elite_usa_advice)) -#' plot(nae) #' @export node_automorphic_equivalence <- function(object, k = c("silhouette", "elbow", "strict"), diff --git a/man/equivalence.Rd b/man/equivalence.Rd index 243dde38..5c95d721 100644 --- a/man/equivalence.Rd +++ b/man/equivalence.Rd @@ -106,13 +106,8 @@ automorphically equivalent classes }} \examples{ -(nse_conc <- node_structural_equivalence(ison_southern_women, - cluster = "concor")) -plot(nse_conc) -(nre <- node_regular_equivalence(ison_algebra, "elbow")) -plot(nre) -(nae <- node_automorphic_equivalence(mpn_elite_usa_advice)) -plot(nae) +(nse <- node_structural_equivalence(mpn_elite_usa_advice)) +plot(nse) } \references{ Thorndike, Robert L. 1953. diff --git a/man/reexports.Rd b/man/reexports.Rd index 435fd39a..4f385d74 100644 --- a/man/reexports.Rd +++ b/man/reexports.Rd @@ -40,7 +40,7 @@ below to see their documentation. \item{ggplot2}{\code{\link[ggplot2]{aes}}, \code{\link[ggplot2]{ggplot}}, \code{\link[ggplot2]{ggsave}}, \code{\link[ggplot2:labs]{ggtitle}}, \code{\link[ggplot2]{labs}}, \code{\link[ggplot2:labs]{xlab}}, \code{\link[ggplot2:labs]{ylab}}} - \item{igraph}{\code{\link[igraph:make_bipartite_graph]{is_bipartite}}, \code{\link[igraph:is_igraph]{is.igraph}}} + \item{igraph}{\code{\link[igraph:is_igraph]{is.igraph}}, \code{\link[igraph:make_bipartite_graph]{is_bipartite}}} \item{network}{\code{\link[network:network]{as.network}}, \code{\link[network:network]{is.network}}} diff --git a/tests/testthat/test-model_regression.R b/tests/testthat/test-model_regression.R index 6545ca51..f850d984 100644 --- a/tests/testthat/test-model_regression.R +++ b/tests/testthat/test-model_regression.R @@ -34,3 +34,9 @@ test_that("glance works correctly for network_reg",{ expect_s3_class(glances, "tbl_df") expect_equal(round(glances$r.squared, 4), 0.0575) }) + +plots <- plot(test) +test_that("plot works correctly for network_reg",{ + expect_s3_class(plots, "gg") + expect_equal(plots$labels$x, "Statistic") +})