diff --git a/DESCRIPTION b/DESCRIPTION index 9748ca1..c763c7d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,6 @@ Package: netrics Title: Many Ways to Measure and Classify Membership for Networks, Nodes, and Ties -Version: 0.2.3 -Date: 2026-04-25 +Version: 0.3.0 Description: Many tools for calculating network, node, or tie marks, measures, motifs and memberships of many different types of networks. Marks identify structural positions, measures quantify network properties, @@ -14,10 +13,9 @@ License: MIT + file LICENSE Language: en-GB Encoding: UTF-8 LazyData: true -RoxygenNote: 7.3.3 Depends: - R (>= 3.6.0), - manynet + R (>= 4.1.0), + manynet (>= 2.0.0) Imports: dplyr, igraph (>= 2.1.0) @@ -45,3 +43,4 @@ Config/Needs/website: Config/testthat/parallel: true Config/testthat/edition: 3 Config/testthat/start-first: measure_net +Config/roxygen2/version: 8.0.0 diff --git a/NAMESPACE b/NAMESPACE index 8aa1531..acfdc89 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,5 @@ # Generated by roxygen2: do not edit by hand -export("%>%") export(cluster_concor) export(cluster_cosine) export(cluster_hierarchical) @@ -178,7 +177,10 @@ export(tie_is_simmelian) export(tie_is_transitive) export(tie_is_triangular) export(tie_is_triplet) -importFrom(dplyr,"%>%") +importFrom(dplyr,filter) +importFrom(dplyr,group_by) +importFrom(dplyr,mutate) +importFrom(dplyr,select) importFrom(igraph,V) importFrom(igraph,adhesion) importFrom(igraph,all_shortest_paths) diff --git a/NEWS.md b/NEWS.md index 55cc3a1..bc93604 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,25 @@ +# netrics 0.3.0 + +## Package + +- Improved docs/examples to use base R pipe (|>) instead of magrittr's %>% +- Improved dependency requirements (R >= 4.1.0) +- Improved startup messages to be more succinct + +## Measures + +- Fixed `node_by_homophily()` to work when attribute is provided as a vector (e.g., a membership vector) +- Improved `node_by_homophily()` to avoid calling `as_igraph()` multiple times + +## Motifs + +- Fixed `net_x_hazard()` to use `diff_model$t` for naming the returned data frame columns, rather than the deprecated `diff_model$time` + +## Tutorials + +- Updated topology tutorial to use base R pipe (|>) instead of magrittr's %>% +- Updated centrality tutorial to use base R pipe (|>) instead of magrittr's %>% + # netrics 0.2.3 ## Tutorials diff --git a/R/class_metrics.R b/R/class_metrics.R index 8b336ef..5fb3beb 100644 --- a/R/class_metrics.R +++ b/R/class_metrics.R @@ -76,7 +76,3 @@ make_network_motif <- function(out, .data) { attr(out, "call") <- deparse(sys.calls()) out } - -#' @importFrom dplyr %>% -#' @export -dplyr::`%>%` diff --git a/R/mark_nodes.R b/R/mark_nodes.R index 439477d..b136063 100644 --- a/R/mark_nodes.R +++ b/R/mark_nodes.R @@ -240,10 +240,10 @@ node_is_latent <- function(.data, time = 0){ .data <- manynet::expect_nodes(.data) if(manynet::is_changing(.data)){ t <- time - latent <- manynet::as_changelist(.data) %>% - dplyr::filter(time <= t & value %in% c("E", "I")) %>% - dplyr::group_by(node) %>% - dplyr::mutate(n = dplyr::n()) %>% + latent <- manynet::as_changelist(.data) |> + dplyr::filter(time <= t & value %in% c("E", "I")) |> + dplyr::group_by(node) |> + dplyr::mutate(n = dplyr::n()) |> dplyr::filter(n == 1 & value == "E") if (manynet::is_labelled(.data)) { out <- seq_len(manynet::net_nodes(.data)) %in% latent$node @@ -253,10 +253,10 @@ node_is_latent <- function(.data, time = 0){ } make_node_mark(out, .data) } else if(inherits(.data, "diff_model")){ - latent <- summary(.data) %>% - dplyr::filter(t <= time & event %in% c("E", "I")) %>% - dplyr::group_by(nodes) %>% - dplyr::mutate(n = dplyr::n()) %>% + latent <- summary(.data) |> + dplyr::filter(t <= time & event %in% c("E", "I")) |> + dplyr::group_by(nodes) |> + dplyr::mutate(n = dplyr::n()) |> dplyr::filter(n == 1 & event == "E") net <- attr(.data, "network") if (manynet::is_labelled(net)) { @@ -283,10 +283,10 @@ node_is_infected <- function(.data, time = 0) { .data <- manynet::expect_nodes(.data) if(manynet::is_changing(.data)){ t <- time - infected <- manynet::as_changelist(.data) %>% - dplyr::filter(time <= t & value %in% c("I", "R")) %>% - dplyr::group_by(node) %>% - dplyr::mutate(n = dplyr::n()) %>% + infected <- manynet::as_changelist(.data) |> + dplyr::filter(time <= t & value %in% c("I", "R")) |> + dplyr::group_by(node) |> + dplyr::mutate(n = dplyr::n()) |> dplyr::filter(n == 1 & value == "I") if (manynet::is_labelled(.data)) { out <- seq_len(manynet::net_nodes(.data)) %in% infected$node @@ -296,10 +296,10 @@ node_is_infected <- function(.data, time = 0) { } make_node_mark(out, .data) } else if(inherits(.data, "diff_model")){ - infected <- summary(.data) %>% - dplyr::filter(t <= time & event %in% c("I", "R")) %>% - dplyr::group_by(nodes) %>% - dplyr::mutate(n = dplyr::n()) %>% + infected <- summary(.data) |> + dplyr::filter(t <= time & event %in% c("I", "R")) |> + dplyr::group_by(nodes) |> + dplyr::mutate(n = dplyr::n()) |> dplyr::filter(n == 1 & event == "I") net <- attr(.data, "network") if (manynet::is_labelled(net)) { @@ -325,10 +325,10 @@ node_is_recovered <- function(.data, time = 0){ .data <- manynet::expect_nodes(.data) if(manynet::is_changing(.data)){ t <- time - recovered <- manynet::as_changelist(.data) %>% - dplyr::filter(time <= t & value %in% c("R")) %>% - dplyr::group_by(node) %>% - dplyr::mutate(n = dplyr::n()) %>% + recovered <- manynet::as_changelist(.data) |> + dplyr::filter(time <= t & value %in% c("R")) |> + dplyr::group_by(node) |> + dplyr::mutate(n = dplyr::n()) |> dplyr::filter(n == 1 & value == "R") if (manynet::is_labelled(.data)) { out <- seq_len(manynet::net_nodes(.data)) %in% recovered$node @@ -338,10 +338,10 @@ node_is_recovered <- function(.data, time = 0){ } make_node_mark(out, .data) } else if(inherits(.data, "diff_model")){ - recovered <- summary(.data) %>% - dplyr::filter(t <= time & event == "R") %>% - dplyr::group_by(nodes) %>% - dplyr::mutate(n = dplyr::n()) %>% + recovered <- summary(.data) |> + dplyr::filter(t <= time & event == "R") |> + dplyr::group_by(nodes) |> + dplyr::mutate(n = dplyr::n()) |> dplyr::filter(n == 1) net <- attr(.data, "network") if (manynet::is_labelled(net)) { @@ -372,6 +372,7 @@ node_is_recovered <- function(.data, time = 0){ #' then the function will return nodes exposure to the seed nodes #' in that diffusion. #' @param mark vector denoting which nodes are infected +#' @importFrom dplyr filter select group_by mutate #' @examples #' # To mark which nodes are currently exposed #' (expos <- node_is_exposed(manynet::create_tree(14), mark = c(1,3))) @@ -384,9 +385,9 @@ node_is_exposed <- function(.data, mark, time = 0){ t <- time return(make_node_mark(node_by_adopt_exposure(.data, time = t)>0, .data)) } else if(inherits(.data, "diff_model")){ - mark <- summary(.data) %>% - dplyr::filter(t == 0 & event == "I") %>% - dplyr::select(nodes) %>% unlist() + mark <- summary(.data) |> + dplyr::filter(t == 0 & event == "I") |> + dplyr::select(nodes) |> unlist() .data <- attr(.data, "network") } } diff --git a/R/mark_ties.R b/R/mark_ties.R index 55e1f87..fb6b44f 100644 --- a/R/mark_ties.R +++ b/R/mark_ties.R @@ -62,7 +62,7 @@ tie_is_bridge <- function(.data){ #' By default FALSE, sampling just a single path. #' @importFrom igraph all_shortest_paths #' @examples -#' ison_adolescents %>% +#' ison_adolescents |> #' mutate_ties(route = tie_is_path(from = "Jane", to = 7)) #' @export tie_is_path <- function(.data, from, to, all_paths = FALSE){ @@ -141,7 +141,7 @@ NULL #' @rdname mark_triangles #' @importFrom igraph triangles #' @examples -#' ison_monks %>% to_uniplex("like") %>% +#' ison_monks |> to_uniplex("like") |> #' mutate_ties(tri = tie_is_triangular()) #' @export tie_is_triangular <- function(.data){ @@ -161,7 +161,7 @@ tie_is_triangular <- function(.data){ #' @rdname mark_triangles #' @examples -#' ison_adolescents %>% to_directed() %>% +#' ison_adolescents |> to_directed() |> #' mutate_ties(trans = tie_is_transitive()) #' @export tie_is_transitive <- function(.data){ @@ -177,7 +177,7 @@ tie_is_transitive <- function(.data){ #' @rdname mark_triangles #' @examples -#' ison_adolescents %>% to_directed() %>% +#' ison_adolescents |> to_directed() |> #' mutate_ties(trip = tie_is_triplet()) #' @export tie_is_triplet <- function(.data){ @@ -198,7 +198,7 @@ tie_is_triplet <- function(.data){ #' @rdname mark_triangles #' @examples -#' ison_adolescents %>% to_directed() %>% +#' ison_adolescents |> to_directed() |> #' mutate_ties(cyc = tie_is_cyclical()) #' @export tie_is_cyclical <- function(.data){ @@ -214,7 +214,7 @@ tie_is_cyclical <- function(.data){ #' @rdname mark_triangles #' @examples -#' ison_monks %>% to_uniplex("like") %>% +#' ison_monks |> to_uniplex("like") |> #' mutate_ties(simmel = tie_is_simmelian()) #' @export tie_is_simmelian <- function(.data){ @@ -229,7 +229,7 @@ tie_is_simmelian <- function(.data){ # #' @rdname mark_triangles # #' @examples -# #' generate_random(8, directed = TRUE) %>% +# #' generate_random(8, directed = TRUE) |> # #' mutate_ties(forbid = tie_is_forbidden()) # #' @export # tie_is_forbidden <- function(.data){ @@ -262,7 +262,7 @@ tie_is_simmelian <- function(.data){ #' @rdname mark_triangles #' @examples -#' fict_marvel %>% to_uniplex("relationship") %>% tie_is_imbalanced() +#' fict_marvel |> to_uniplex("relationship") |> tie_is_imbalanced() #' @export tie_is_imbalanced <- function(.data){ .data <- manynet::expect_ties(.data) diff --git a/R/measure_centrality_between.R b/R/measure_centrality_between.R index 1a5c482..1167dfb 100644 --- a/R/measure_centrality_between.R +++ b/R/measure_centrality_between.R @@ -179,7 +179,7 @@ NULL #' @importFrom igraph edge_betweenness #' @examples #' (tb <- tie_by_betweenness(ison_adolescents)) -#' ison_adolescents %>% mutate_ties(weight = tb) +#' ison_adolescents |> mutate_ties(weight = tb) #' @export tie_by_betweenness <- function(.data, normalized = TRUE){ .data <- manynet::expect_ties(.data) diff --git a/R/measure_centrality_closeness.R b/R/measure_centrality_closeness.R index f118004..fe1df65 100644 --- a/R/measure_centrality_closeness.R +++ b/R/measure_centrality_closeness.R @@ -361,7 +361,7 @@ NULL #' @rdname measure_centralities_close #' @examples #' (ec <- tie_by_closeness(ison_adolescents)) -#' ison_adolescents %>% mutate_ties(weight = ec) +#' ison_adolescents |> mutate_ties(weight = ec) #' @export tie_by_closeness <- function(.data, normalized = TRUE){ .data <- manynet::expect_ties(.data) diff --git a/R/measure_diffusion.R b/R/measure_diffusion.R index 5e0d60d..fc60741 100644 --- a/R/measure_diffusion.R +++ b/R/measure_diffusion.R @@ -306,8 +306,8 @@ node_by_adopt_time <- function(.data){ if(inherits(.data, "diff_model")){ net <- attr(.data, "network") - out <- summary(.data) %>% dplyr::filter(event == "I") %>% - dplyr::distinct(nodes, .keep_all = TRUE) %>% + out <- summary(.data) |> dplyr::filter(event == "I") |> + dplyr::distinct(nodes, .keep_all = TRUE) |> dplyr::select(nodes,t) if(!manynet::is_labelled(net)) out <- dplyr::arrange(out, nodes) else if (is.numeric(out$nodes)) @@ -323,8 +323,8 @@ node_by_adopt_time <- function(.data){ } } else { net <- .data - out <- manynet::as_changelist(.data) %>% dplyr::filter(value == "I") %>% - dplyr::distinct(node, .keep_all = TRUE) %>% + out <- manynet::as_changelist(.data) |> dplyr::filter(value == "I") |> + dplyr::distinct(node, .keep_all = TRUE) |> dplyr::select(node,time) if(!manynet::is_labelled(net)) out <- dplyr::arrange(out, node) else if (is.numeric(out$node)) @@ -379,9 +379,9 @@ node_by_adopt_threshold <- function(.data, normalized = TRUE, lag = 1){ } } if(any(out$event == "E")) - out <- out %>% dplyr::filter(event == "E") else - out <- out %>% dplyr::filter(event == "I") - out <- out %>% dplyr::distinct(nodes, .keep_all = TRUE) %>% + out <- out |> dplyr::filter(event == "E") else + out <- out |> dplyr::filter(event == "I") + out <- out |> dplyr::distinct(nodes, .keep_all = TRUE) |> dplyr::select(nodes, exposure) if(manynet::is_labelled(net)) out <- stats::setNames(out$exposure, manynet::node_names(net)[out$nodes]) else @@ -398,9 +398,9 @@ node_by_adopt_threshold <- function(.data, normalized = TRUE, lag = 1){ } } if(any(out$value == "E")) - out <- out %>% dplyr::filter(value == "E") else - out <- out %>% dplyr::filter(value == "I") - out <- out %>% dplyr::distinct(node, .keep_all = TRUE) %>% + out <- out |> dplyr::filter(value == "E") else + out <- out |> dplyr::filter(value == "I") + out <- out |> dplyr::distinct(node, .keep_all = TRUE) |> dplyr::select(node, exposure) if(manynet::is_labelled(net)) out <- stats::setNames(out$exposure, manynet::node_names(net)[out$node]) else diff --git a/R/measure_heterogeneity.R b/R/measure_heterogeneity.R index ff3010b..7f8bc2c 100644 --- a/R/measure_heterogeneity.R +++ b/R/measure_heterogeneity.R @@ -531,10 +531,15 @@ node_by_homophily <- function(.data, attribute, manynet::snet_info("Using {.val ie} index instead.") assortativity <- "ie" } - out <- vapply(igraph::ego(manynet::as_igraph(.data)), - function(x) net_by_homophily( - igraph::induced_subgraph(manynet::as_igraph(.data), x), - attribute, assortativity = assortativity), + idat <- manynet::as_igraph(.data) + out <- vapply(igraph::ego(idat), + function(x) { + subattr <- if (length(attribute) == 1 && is.character(attribute)) + attribute else attribute[as.integer(x)] + net_by_homophily( + igraph::induced_subgraph(idat, x), + subattr, assortativity = assortativity) + }, FUN.VALUE = numeric(1)) make_node_measure(out, .data) } diff --git a/R/member_components.R b/R/member_components.R index 69b3295..1f9bf60 100644 --- a/R/member_components.R +++ b/R/member_components.R @@ -28,7 +28,7 @@ NULL #' @rdname member_components #' @importFrom igraph components #' @examples -#' ison_monks %>% to_uniplex("esteem") %>% +#' ison_monks |> to_uniplex("esteem") |> #' mutate_nodes(comp = node_in_component()) #' @export node_in_component <- function(.data){ diff --git a/R/member_core.R b/R/member_core.R index 16d4044..d5400a9 100644 --- a/R/member_core.R +++ b/R/member_core.R @@ -41,7 +41,7 @@ NULL #' \doi{10.48550/arXiv.1102.5511} #' @examples #' node_is_core(ison_adolescents) -#' ison_adolescents %>% +#' ison_adolescents |> #' mutate(corep = node_is_core()) #' @export node_is_core <- function(.data, centrality = c("degree", "eigenvector")){ diff --git a/R/member_equivalence.R b/R/member_equivalence.R index 0b58cb4..da21c05 100644 --- a/R/member_equivalence.R +++ b/R/member_equivalence.R @@ -49,15 +49,15 @@ NULL #' @rdname member_equivalence #' @export node_in_equivalence <- function(.data, motif, - k = c("silhouette", "elbow", "strict"), - cluster = c("hierarchical", "concor", "cosine"), - distance = c("euclidean", "maximum", "manhattan", - "canberra", "binary", "minkowski"), - Kmax = 8L){ + k = c("silhouette", "elbow", "strict"), + cluster = c("hierarchical", "concor", "cosine"), + distance = c("euclidean", "maximum", "manhattan", + "canberra", "binary", "minkowski"), + Kmax = 8L){ .data <- manynet::expect_nodes(.data) hc <- switch(match.arg(cluster), - hierarchical = cluster_hierarchical(motif, - match.arg(distance)), + hierarchical = cluster_hierarchical(motif, + match.arg(distance)), concor = cluster_concor(.data, motif), cosine = cluster_cosine(motif, match.arg(distance))) @@ -80,18 +80,19 @@ node_in_equivalence <- function(.data, motif, #' (nse <- node_in_structural(ison_algebra)) #' @export node_in_structural <- function(.data, - k = c("silhouette", "elbow", "strict"), - cluster = c("hierarchical", "concor","cosine"), - distance = c("euclidean", "maximum", "manhattan", - "canberra", "binary", "minkowski"), - Kmax = 8L){ + k = c("silhouette", "elbow", "strict"), + cluster = c("hierarchical", "concor","cosine"), + distance = c("euclidean", "maximum", "manhattan", + "canberra", "binary", "minkowski"), + Kmax = 8L){ .data <- manynet::expect_nodes(.data) mat <- node_x_tie(.data) if(any(colSums(t(mat))==0)){ mat <- cbind(mat, (colSums(t(mat))==0)) } node_in_equivalence(.data, mat, - k = k, cluster = cluster, distance = distance, Kmax = Kmax) + k = k, cluster = cluster, distance = distance, + Kmax = Kmax) } #' @rdname member_equivalence @@ -130,11 +131,11 @@ node_in_regular <- function(.data, #' } #' @export node_in_automorphic <- function(.data, - k = c("silhouette", "elbow", "strict"), - cluster = c("hierarchical", "concor","cosine"), - distance = c("euclidean", "maximum", "manhattan", - "canberra", "binary", "minkowski"), - Kmax = 8L){ + k = c("silhouette", "elbow", "strict"), + cluster = c("hierarchical", "concor","cosine"), + distance = c("euclidean", "maximum", "manhattan", + "canberra", "binary", "minkowski"), + Kmax = 8L){ .data <- manynet::expect_nodes(.data) mat <- node_x_path(.data) node_in_equivalence(.data, mat, diff --git a/R/motif_brokerage.R b/R/motif_brokerage.R index 8813b1f..fb89862 100644 --- a/R/motif_brokerage.R +++ b/R/motif_brokerage.R @@ -160,7 +160,7 @@ node_by_brokering_exclusivity <- function(.data, membership){ twopaths <- dplyr::filter(twopaths, from_memb != to_memb) } # get only exclusive paths - out <- twopaths %>% dplyr::group_by(from, to.y) %>% dplyr::filter(dplyr::n()==1) + out <- twopaths |> dplyr::group_by(from, to.y) |> dplyr::filter(dplyr::n()==1) # tabulate brokerage out <- c(table(out$to)) # correct ordering for named data diff --git a/R/motif_census.R b/R/motif_census.R index 9568880..3133d37 100644 --- a/R/motif_census.R +++ b/R/motif_census.R @@ -661,7 +661,7 @@ net_x_hazard <- function(.data){ if(inherits(.data, "diff_model")) net <- attr(.data, "network") else net <- .data - names(out) <- paste0("t", diff_model$time) + names(out) <- paste0("t", diff_model$t) make_network_motif(out, net) } diff --git a/R/zzz.R b/R/zzz.R index 634a480..e5a2416 100644 --- a/R/zzz.R +++ b/R/zzz.R @@ -18,14 +18,14 @@ greet_startup_cli <- function() { tips <- c( - "i" = "There are lots of ways to contribute to {.pkg netrics} at {.url https://github.com/stocnet/netrics/}.", - "i" = "Please share bugs, issues, or feature requests at {.url https://github.com/stocnet/netrics/issues}. It's really helpful!", + "i" = "Contribute to {.pkg netrics} at {.url https://github.com/stocnet/netrics/}.", + "i" = "Share bugs, issues, or feature requests at {.url https://github.com/stocnet/netrics/issues}.", # "i" = "To suppress package startup messages, use: `suppressPackageStartupMessages(library({.pkg netrics}))`.", # "i" = "Changing the theme of all your graphs is straightforward with `set_manynet_theme()`", # "i" = "If too many messages appear in the console, run `options(snet_verbosity = 'quiet')`", "i" = "Explore changes since the last version with {.code news(package = 'netrics')}.", "i" = "Visit the website to learn more: {.url https://stocnet.github.io/netrics/}.", - "i" = "The 'Function Overview' may suggest new analytic opportunities: {.url https://stocnet.github.io/netrics/reference/index.html}." + "i" = "Discover new analytic opportunities: {.url https://stocnet.github.io/netrics/reference/index.html}." # "i" = "Discover {.emph stocnet} R packages at {.url https://github.com/stocnet/}." # "i" = "Star me at {.url https://github.com/users/follow?target=jhollway}.", # "i" = "You can list all the tutorials available in {.pkg netrics} using {.fn run_tute}, and run them too!" diff --git a/inst/tutorials/tutorial3/centrality.Rmd b/inst/tutorials/tutorial3/centrality.Rmd index 215becf..ba92826 100644 --- a/inst/tutorials/tutorial3/centrality.Rmd +++ b/inst/tutorials/tutorial3/centrality.Rmd @@ -77,14 +77,14 @@ graphr(____) ```{r coercion-hint-2, purl = FALSE} # Now, let's create a two-mode version 'ison_brandes2' and graph it. -ison_brandes2 <- ison_brandes %>% rename(type = twomode_type) +ison_brandes2 <- ison_brandes |> rename_nodes(type = twomode_type) graphr(____) ``` ```{r coercion-solution} # plot the one-mode version graphr(ison_brandes) -ison_brandes2 <- ison_brandes %>% rename(type = twomode_type) +ison_brandes2 <- ison_brandes |> rename_nodes(type = twomode_type) # plot the two-mode version graphr(ison_brandes2, layout = "bipartite") ``` @@ -427,10 +427,10 @@ but fortunately the `{patchwork}` package is here to help. ``` ```{r multiplot-solution} -ison_brandes <- ison_brandes %>% - add_node_attribute("degree", node_is_max(node_by_degree(ison_brandes))) %>% - add_node_attribute("betweenness", node_is_max(node_by_betweenness(ison_brandes))) %>% - add_node_attribute("closeness", node_is_max(node_by_closeness(ison_brandes))) %>% +ison_brandes <- ison_brandes |> + add_node_attribute("degree", node_is_max(node_by_degree(ison_brandes))) |> + add_node_attribute("betweenness", node_is_max(node_by_betweenness(ison_brandes))) |> + add_node_attribute("closeness", node_is_max(node_by_closeness(ison_brandes))) |> add_node_attribute("eigenvector", node_is_max(node_by_eigenvector(ison_brandes))) gd <- graphr(ison_brandes, node_color = "degree") + ggtitle("Degree", subtitle = round(net_by_degree(ison_brandes), 2)) diff --git a/inst/tutorials/tutorial6/topology.Rmd b/inst/tutorials/tutorial6/topology.Rmd index 2be6e10..71e27dc 100644 --- a/inst/tutorials/tutorial6/topology.Rmd +++ b/inst/tutorials/tutorial6/topology.Rmd @@ -420,8 +420,8 @@ in the core will maximise the core-periphery structure of the network. ``` ```{r nodecore-solution} -lawfirm %>% - mutate(nc = node_is_core()) %>% +lawfirm |> + mutate_nodes(nc = node_is_core()) |> graphr(node_color = "nc", edge_color = "gray") ``` @@ -508,8 +508,8 @@ with `node_by_kcoreness()` instead of the `node_is_core()` used for core-periphery. ```{r nodecoren, exercise=TRUE, purl = FALSE, exercise.setup="gnet"} -lawfirm %>% - mutate(ncn = node_by_kcoreness()) %>% +lawfirm |> + mutate_nodes(ncn = node_by_kcoreness()) |> graphr(node_color = "ncn") ``` @@ -726,7 +726,8 @@ Can you add a node attribute that highlights which nodes are cutpoints? ``` ```{r closerlook-solution} -ison_adolescents |> mutate(cut = node_is_cutpoint(ison_adolescents)) |> +ison_adolescents |> + mutate_nodes(cut = node_is_cutpoint()) |> graphr(node_color = "cut") ``` @@ -741,7 +742,8 @@ Here we are interested in identifying which ties are `r gloss("bridges","bridge" ```{r tieside-solution} net_by_adhesion(ison_adolescents) -ison_adolescents |> mutate_ties(cut = tie_is_bridge(ison_adolescents)) |> +ison_adolescents |> + mutate_ties(cut = tie_is_bridge()) |> graphr(edge_color = "cut") ``` @@ -754,7 +756,8 @@ This is called (rather confusingly) tie cohesion. ``` ```{r tiecoh-solution} -ison_adolescents |> mutate_ties(coh = tie_by_cohesion(ison_adolescents)) |> +ison_adolescents |> + mutate_ties(coh = tie_by_cohesion()) |> graphr(edge_size = "coh") ``` diff --git a/man/mark_core.Rd b/man/mark_core.Rd index 732a212..5387d1a 100644 --- a/man/mark_core.Rd +++ b/man/mark_core.Rd @@ -10,7 +10,7 @@ node_is_core(.data, centrality = c("degree", "eigenvector")) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{centrality}{Which centrality measure to use to identify cores and periphery. By default this is "degree", @@ -44,7 +44,7 @@ it ignores ties between these blocks. \examples{ node_is_core(ison_adolescents) -ison_adolescents \%>\% +ison_adolescents |> mutate(corep = node_is_core()) } \references{ @@ -61,11 +61,11 @@ Lip, Sean Z. W. 2011. } } \seealso{ -Other core-periphery: +Other core-periphery: \code{\link{measure_core}}, \code{\link{member_core}} -Other marks: +Other marks: \code{\link{mark_degree}}, \code{\link{mark_diff}}, \code{\link{mark_dyads}}, @@ -75,7 +75,7 @@ Other marks: \code{\link{mark_ties}}, \code{\link{mark_triangles}} -Other nodal: +Other nodal: \code{\link{mark_degree}}, \code{\link{mark_diff}}, \code{\link{mark_nodes}}, diff --git a/man/mark_degree.Rd b/man/mark_degree.Rd index 3f609d4..30b385c 100644 --- a/man/mark_degree.Rd +++ b/man/mark_degree.Rd @@ -16,7 +16,7 @@ node_is_universal(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_mark} logical vector the length of the nodes in the network, @@ -51,12 +51,12 @@ node_is_isolate(ison_brandes) node_is_universal(create_star(11)) } \seealso{ -Other degree: +Other degree: \code{\link{measure_central_degree}}, \code{\link{measure_centralisation_degree}}, \code{\link{measure_centralities_degree}} -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_diff}}, \code{\link{mark_dyads}}, @@ -66,7 +66,7 @@ Other marks: \code{\link{mark_ties}}, \code{\link{mark_triangles}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_diff}}, \code{\link{mark_nodes}}, diff --git a/man/mark_diff.Rd b/man/mark_diff.Rd index d7e174d..3cb5950 100644 --- a/man/mark_diff.Rd +++ b/man/mark_diff.Rd @@ -19,7 +19,7 @@ node_is_exposed(.data, mark, time = 0) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{time}{A time step at which nodes are identified.} @@ -64,7 +64,7 @@ in that diffusion. which(expos) } \seealso{ -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_dyads}}, @@ -74,7 +74,7 @@ Other marks: \code{\link{mark_ties}}, \code{\link{mark_triangles}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_nodes}}, @@ -104,7 +104,7 @@ Other nodal: \code{\link{motif_node}}, \code{\link{motif_path}} -Other diffusion: +Other diffusion: \code{\link{measure_diffusion_infection}}, \code{\link{measure_diffusion_net}}, \code{\link{measure_diffusion_node}}, diff --git a/man/mark_dyads.Rd b/man/mark_dyads.Rd index 470859e..d1d99e0 100644 --- a/man/mark_dyads.Rd +++ b/man/mark_dyads.Rd @@ -13,7 +13,7 @@ tie_is_reciprocated(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{tie_mark} logical vector the length of the ties in the network, @@ -36,7 +36,7 @@ tie_is_multiple(fict_marvel) tie_is_reciprocated(ison_algebra) } \seealso{ -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -46,7 +46,7 @@ Other marks: \code{\link{mark_ties}}, \code{\link{mark_triangles}} -Other tie: +Other tie: \code{\link{mark_select_tie}}, \code{\link{mark_ties}}, \code{\link{mark_triangles}}, diff --git a/man/mark_nodes.Rd b/man/mark_nodes.Rd index 331899a..faa37ef 100644 --- a/man/mark_nodes.Rd +++ b/man/mark_nodes.Rd @@ -22,7 +22,7 @@ node_is_neighbor(.data, node) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{elites}{The proportion of nodes to be selected as mentors. By default this is set at 0.1. @@ -97,7 +97,7 @@ Valente, Thomas, and Rebecca Davis. 1999. } } \seealso{ -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -107,7 +107,7 @@ Other marks: \code{\link{mark_ties}}, \code{\link{mark_triangles}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/mark_select_node.Rd b/man/mark_select_node.Rd index aa8394a..56daa74 100644 --- a/man/mark_select_node.Rd +++ b/man/mark_select_node.Rd @@ -19,7 +19,7 @@ node_is_mean(node_measure, ranks = 1) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{select}{Number of elements to select (as TRUE).} @@ -54,10 +54,10 @@ node_is_min(node_by_degree(ison_brandes)) node_is_mean(node_by_degree(ison_brandes)) } \seealso{ -Other selection: +Other selection: \code{\link{mark_select_tie}} -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -67,7 +67,7 @@ Other marks: \code{\link{mark_ties}}, \code{\link{mark_triangles}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/mark_select_tie.Rd b/man/mark_select_tie.Rd index ce76027..7503b01 100644 --- a/man/mark_select_tie.Rd +++ b/man/mark_select_tie.Rd @@ -16,7 +16,7 @@ tie_is_min(tie_measure) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{select}{Number of elements to select (as TRUE).} @@ -42,7 +42,7 @@ tie_is_max(tie_by_betweenness(ison_brandes)) tie_is_min(tie_by_betweenness(ison_brandes)) } \seealso{ -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -52,7 +52,7 @@ Other marks: \code{\link{mark_ties}}, \code{\link{mark_triangles}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_ties}}, \code{\link{mark_triangles}}, @@ -62,7 +62,7 @@ Other tie: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other selection: +Other selection: \code{\link{mark_select_node}} } \concept{marks} diff --git a/man/mark_ties.Rd b/man/mark_ties.Rd index 8a0ff22..18f0d68 100644 --- a/man/mark_ties.Rd +++ b/man/mark_ties.Rd @@ -19,7 +19,7 @@ tie_is_path(.data, from, to, all_paths = FALSE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{from}{The index or name of the node from which the path should start.} @@ -50,11 +50,11 @@ are particularly well- or poorly-connected. tie_is_loop(fict_marvel) tie_is_feedback(ison_algebra) tie_is_bridge(ison_brandes) -ison_adolescents \%>\% +ison_adolescents |> mutate_ties(route = tie_is_path(from = "Jane", to = 7)) } \seealso{ -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -64,7 +64,7 @@ Other marks: \code{\link{mark_select_tie}}, \code{\link{mark_triangles}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_select_tie}}, \code{\link{mark_triangles}}, diff --git a/man/mark_triangles.Rd b/man/mark_triangles.Rd index 3cbdf74..7a25ade 100644 --- a/man/mark_triangles.Rd +++ b/man/mark_triangles.Rd @@ -25,7 +25,7 @@ tie_is_imbalanced(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{tie_mark} logical vector the length of the ties in the network, @@ -49,20 +49,20 @@ They are most useful in highlighting parts of the network that are cohesively connected. } \examples{ -ison_monks \%>\% to_uniplex("like") \%>\% +ison_monks |> to_uniplex("like") |> mutate_ties(tri = tie_is_triangular()) -ison_adolescents \%>\% to_directed() \%>\% +ison_adolescents |> to_directed() |> mutate_ties(trans = tie_is_transitive()) -ison_adolescents \%>\% to_directed() \%>\% +ison_adolescents |> to_directed() |> mutate_ties(trip = tie_is_triplet()) -ison_adolescents \%>\% to_directed() \%>\% +ison_adolescents |> to_directed() |> mutate_ties(cyc = tie_is_cyclical()) -ison_monks \%>\% to_uniplex("like") \%>\% +ison_monks |> to_uniplex("like") |> mutate_ties(simmel = tie_is_simmelian()) -fict_marvel \%>\% to_uniplex("relationship") \%>\% tie_is_imbalanced() +fict_marvel |> to_uniplex("relationship") |> tie_is_imbalanced() } \seealso{ -Other marks: +Other marks: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -72,7 +72,7 @@ Other marks: \code{\link{mark_select_tie}}, \code{\link{mark_ties}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_select_tie}}, \code{\link{mark_ties}}, @@ -82,7 +82,7 @@ Other tie: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other cohesion: +Other cohesion: \code{\link{measure_breadth}}, \code{\link{measure_cohesion}}, \code{\link{measure_fragmentation}}, diff --git a/man/measure_assort_net.Rd b/man/measure_assort_net.Rd index 7278ea1..f62a223 100644 --- a/man/measure_assort_net.Rd +++ b/man/measure_assort_net.Rd @@ -23,7 +23,7 @@ net_by_spatial(.data, attribute) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{attribute}{Name of a nodal attribute, mark, measure, or membership vector.} @@ -50,9 +50,9 @@ This value can range from -1 to 1, where 1 indicates perfect association Geary's C is a measure of spatial autocorrelation, calculated as: \deqn{C = \frac{(n - 1) \sum - \limits_{i=1}^n \sum\limits_{j=1}^n w_{ij} (x_i - x_j)^2}{2W \sum\limits_{i=1}^n (x_i - \bar{x})^2}} +\limits_{i=1}^n \sum\limits_{j=1}^n w_{ij} (x_i - x_j)^2}{2W \sum\limits_{i=1}^n (x_i - \bar{x})^2}} where \eqn{n} is the number of nodes, \eqn{ - w_{ij}} is the weight of the tie between nodes \eqn{i} and \eqn{j}, +w_{ij}} is the weight of the tie between nodes \eqn{i} and \eqn{j}, \eqn{x_i} is the attribute value of node \eqn{i}, \eqn{\bar{x}} is the mean attribute value across all nodes, and \eqn{W} is the sum of all tie weights. This value can range from 0 to 2, where values less than 1 @@ -137,12 +137,12 @@ Moran, Patrick Alfred Pierce. 1950. } } \seealso{ -Other diversity: +Other diversity: \code{\link{measure_assort_node}}, \code{\link{measure_diverse_net}}, \code{\link{measure_diverse_node}} -Other measures: +Other measures: \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, \code{\link{measure_broker_node}}, diff --git a/man/measure_assort_node.Rd b/man/measure_assort_node.Rd index 2da8af8..04f7ab4 100644 --- a/man/measure_assort_node.Rd +++ b/man/measure_assort_node.Rd @@ -17,7 +17,7 @@ node_by_homophily( \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{attribute}{Name of a nodal attribute, mark, measure, or membership vector.} @@ -44,9 +44,9 @@ This value can range from -1 to 1, where 1 indicates perfect association Geary's C is a measure of spatial autocorrelation, calculated as: \deqn{C = \frac{(n - 1) \sum - \limits_{i=1}^n \sum\limits_{j=1}^n w_{ij} (x_i - x_j)^2}{2W \sum\limits_{i=1}^n (x_i - \bar{x})^2}} +\limits_{i=1}^n \sum\limits_{j=1}^n w_{ij} (x_i - x_j)^2}{2W \sum\limits_{i=1}^n (x_i - \bar{x})^2}} where \eqn{n} is the number of nodes, \eqn{ - w_{ij}} is the weight of the tie between nodes \eqn{i} and \eqn{j}, +w_{ij}} is the weight of the tie between nodes \eqn{i} and \eqn{j}, \eqn{x_i} is the attribute value of node \eqn{i}, \eqn{\bar{x}} is the mean attribute value across all nodes, and \eqn{W} is the sum of all tie weights. This value can range from 0 to 2, where values less than 1 @@ -77,12 +77,12 @@ node_by_heterophily(marvel_friends, "Gender") node_by_heterophily(marvel_friends, "Attractive") } \seealso{ -Other diversity: +Other diversity: \code{\link{measure_assort_net}}, \code{\link{measure_diverse_net}}, \code{\link{measure_diverse_node}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_breadth}}, \code{\link{measure_broker_node}}, @@ -114,7 +114,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_breadth.Rd b/man/measure_breadth.Rd index 8060709..8cd2760 100644 --- a/man/measure_breadth.Rd +++ b/man/measure_breadth.Rd @@ -13,7 +13,7 @@ net_by_length(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{network_measure} numeric score. @@ -32,14 +32,14 @@ net_by_length(fict_marvel) net_by_length(to_giant(fict_marvel)) } \seealso{ -Other cohesion: +Other cohesion: \code{\link{mark_triangles}}, \code{\link{measure_cohesion}}, \code{\link{measure_fragmentation}}, \code{\link{motif_net}}, \code{\link{motif_node}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_broker_node}}, diff --git a/man/measure_broker_node.Rd b/man/measure_broker_node.Rd index 23e3693..36ac79c 100644 --- a/man/measure_broker_node.Rd +++ b/man/measure_broker_node.Rd @@ -28,7 +28,7 @@ node_by_neighbours_degree(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_measure} numeric vector the length of the nodes in the network, @@ -110,14 +110,14 @@ Barrat, Alain, Marc Barthelemy, Romualdo Pastor-Satorras, and Alessandro Vespign } } \seealso{ -Other brokerage: +Other brokerage: \code{\link{measure_broker_tie}}, \code{\link{measure_brokerage}}, \code{\link{member_brokerage}}, \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -149,7 +149,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_broker_tie.Rd b/man/measure_broker_tie.Rd index f835b03..4df082d 100644 --- a/man/measure_broker_tie.Rd +++ b/man/measure_broker_tie.Rd @@ -10,7 +10,7 @@ tie_by_cohesion(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{tie_measure} numeric vector the length of the ties in the network, @@ -24,14 +24,14 @@ adjacent nodes and the total number of adjacent nodes, where high values indicate ties' embeddedness in dense local environments. } \seealso{ -Other brokerage: +Other brokerage: \code{\link{measure_broker_node}}, \code{\link{measure_brokerage}}, \code{\link{member_brokerage}}, \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -63,7 +63,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_select_tie}}, \code{\link{mark_ties}}, diff --git a/man/measure_brokerage.Rd b/man/measure_brokerage.Rd index a176af8..608877c 100644 --- a/man/measure_brokerage.Rd +++ b/man/measure_brokerage.Rd @@ -13,7 +13,7 @@ node_by_brokering_exclusivity(.data, membership) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{membership}{A character string naming an existing node attribute in the network, or a categorical vector of the same length as the number of @@ -50,7 +50,7 @@ and their application to multi-level environmental governance networks" } } \seealso{ -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -82,7 +82,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -112,7 +112,7 @@ Other nodal: \code{\link{motif_node}}, \code{\link{motif_path}} -Other brokerage: +Other brokerage: \code{\link{measure_broker_node}}, \code{\link{measure_broker_tie}}, \code{\link{member_brokerage}}, diff --git a/man/measure_central_between.Rd b/man/measure_central_between.Rd index aee1906..e330a5f 100644 --- a/man/measure_central_between.Rd +++ b/man/measure_central_between.Rd @@ -19,7 +19,7 @@ node_by_stress(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -50,7 +50,7 @@ in contrast to the shortest paths model used by normal betweenness centrality. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -128,11 +128,11 @@ Shimbel, A. 1953. } } \seealso{ -Other betweenness: +Other betweenness: \code{\link{measure_centralisation_between}}, \code{\link{measure_centralities_between}} -Other centrality: +Other centrality: \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, \code{\link{measure_central_eigen}}, @@ -145,7 +145,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -177,7 +177,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_central_close.Rd b/man/measure_central_close.Rd index 198a6d8..62a5d9b 100644 --- a/man/measure_central_close.Rd +++ b/man/measure_central_close.Rd @@ -31,7 +31,7 @@ node_by_randomwalk(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -77,7 +77,7 @@ given node. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -251,11 +251,11 @@ Noh, J.D. and R. Rieger. 2004. } } \seealso{ -Other closeness: +Other closeness: \code{\link{measure_centralisation_close}}, \code{\link{measure_centralities_close}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_degree}}, \code{\link{measure_central_eigen}}, @@ -268,7 +268,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -300,7 +300,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_central_degree.Rd b/man/measure_central_degree.Rd index 4fac3f6..b1d11c1 100644 --- a/man/measure_central_degree.Rd +++ b/man/measure_central_degree.Rd @@ -33,7 +33,7 @@ node_by_leverage(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -86,7 +86,7 @@ there are several related shortcut functions: All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{manynet::to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -160,12 +160,12 @@ Joyce, Karen E., Paul J. Laurienti, Jonathan H. Burdette, and Satoru Hayasaka. 2 } } \seealso{ -Other degree: +Other degree: \code{\link{mark_degree}}, \code{\link{measure_centralisation_degree}}, \code{\link{measure_centralities_degree}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_eigen}}, @@ -178,7 +178,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -210,7 +210,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_central_eigen.Rd b/man/measure_central_eigen.Rd index f76fce0..711cfd5 100644 --- a/man/measure_central_eigen.Rd +++ b/man/measure_central_eigen.Rd @@ -28,7 +28,7 @@ node_by_subgraph(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -72,7 +72,7 @@ authorities from many hubs. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -207,11 +207,11 @@ Estrada, Ernesto and Rodríguez-Velázquez, Juan A. 2005. } } \seealso{ -Other eigenvector: +Other eigenvector: \code{\link{measure_centralisation_eigen}}, \code{\link{measure_centralities_eigen}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -224,7 +224,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -256,7 +256,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_centralisation_between.Rd b/man/measure_centralisation_between.Rd index ee5c162..3c284a8 100644 --- a/man/measure_centralisation_between.Rd +++ b/man/measure_centralisation_between.Rd @@ -10,7 +10,7 @@ net_by_betweenness(.data, normalized = TRUE, direction = c("all", "out", "in")) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -30,7 +30,7 @@ A \code{network_measure} numeric score. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -38,11 +38,11 @@ including for two-mode networks. net_by_betweenness(ison_southern_women, direction = "in") } \seealso{ -Other betweenness: +Other betweenness: \code{\link{measure_central_between}}, \code{\link{measure_centralities_between}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -55,7 +55,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_centralisation_close.Rd b/man/measure_centralisation_close.Rd index 056571f..d987144 100644 --- a/man/measure_centralisation_close.Rd +++ b/man/measure_centralisation_close.Rd @@ -16,7 +16,7 @@ net_by_harmonic(.data, normalized = TRUE, cutoff = 2) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -43,7 +43,7 @@ A \code{network_measure} numeric score. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -51,11 +51,11 @@ including for two-mode networks. net_by_closeness(ison_southern_women, direction = "in") } \seealso{ -Other closeness: +Other closeness: \code{\link{measure_central_close}}, \code{\link{measure_centralities_close}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -68,7 +68,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_centralisation_degree.Rd b/man/measure_centralisation_degree.Rd index 7a907d0..2a482df 100644 --- a/man/measure_centralisation_degree.Rd +++ b/man/measure_centralisation_degree.Rd @@ -16,7 +16,7 @@ net_by_indegree(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -43,7 +43,7 @@ there are several related shortcut functions: All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. @@ -58,12 +58,12 @@ against only the centrality scores of the other nodes in that mode. net_by_degree(ison_southern_women, direction = "in") } \seealso{ -Other degree: +Other degree: \code{\link{mark_degree}}, \code{\link{measure_central_degree}}, \code{\link{measure_centralities_degree}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -76,7 +76,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_centralisation_eigen.Rd b/man/measure_centralisation_eigen.Rd index f823165..8b8126e 100644 --- a/man/measure_centralisation_eigen.Rd +++ b/man/measure_centralisation_eigen.Rd @@ -10,7 +10,7 @@ net_by_eigenvector(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -27,7 +27,7 @@ network. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -35,11 +35,11 @@ by default, including for two-mode networks. net_by_eigenvector(ison_southern_women) } \seealso{ -Other eigenvector: +Other eigenvector: \code{\link{measure_central_eigen}}, \code{\link{measure_centralities_eigen}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -52,7 +52,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_centralities_between.Rd b/man/measure_centralities_between.Rd index 61f7d4e..4c91162 100644 --- a/man/measure_centralities_between.Rd +++ b/man/measure_centralities_between.Rd @@ -10,7 +10,7 @@ tie_by_betweenness(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -29,20 +29,20 @@ then the scores will be labelled with the ties' adjacent nodes' names. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } \examples{ (tb <- tie_by_betweenness(ison_adolescents)) -ison_adolescents \%>\% mutate_ties(weight = tb) +ison_adolescents |> mutate_ties(weight = tb) } \seealso{ -Other betweenness: +Other betweenness: \code{\link{measure_central_between}}, \code{\link{measure_centralisation_between}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -55,7 +55,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -87,7 +87,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_select_tie}}, \code{\link{mark_ties}}, diff --git a/man/measure_centralities_close.Rd b/man/measure_centralities_close.Rd index 615e874..67b826a 100644 --- a/man/measure_centralities_close.Rd +++ b/man/measure_centralities_close.Rd @@ -10,7 +10,7 @@ tie_by_closeness(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -30,20 +30,20 @@ in the network. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } \examples{ (ec <- tie_by_closeness(ison_adolescents)) -ison_adolescents \%>\% mutate_ties(weight = ec) +ison_adolescents |> mutate_ties(weight = ec) } \seealso{ -Other closeness: +Other closeness: \code{\link{measure_central_close}}, \code{\link{measure_centralisation_close}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -56,7 +56,7 @@ Other centrality: \code{\link{measure_centralities_degree}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -88,7 +88,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_select_tie}}, \code{\link{mark_ties}}, diff --git a/man/measure_centralities_degree.Rd b/man/measure_centralities_degree.Rd index ad19a9d..0a95bdf 100644 --- a/man/measure_centralities_degree.Rd +++ b/man/measure_centralities_degree.Rd @@ -10,7 +10,7 @@ tie_by_degree(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -29,7 +29,7 @@ then the scores will be labelled with the ties' adjacent nodes' names. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -37,12 +37,12 @@ by default, including for two-mode networks. tie_by_degree(ison_adolescents) } \seealso{ -Other degree: +Other degree: \code{\link{mark_degree}}, \code{\link{measure_central_degree}}, \code{\link{measure_centralisation_degree}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -55,7 +55,7 @@ Other centrality: \code{\link{measure_centralities_close}}, \code{\link{measure_centralities_eigen}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -87,7 +87,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_select_tie}}, \code{\link{mark_ties}}, diff --git a/man/measure_centralities_eigen.Rd b/man/measure_centralities_eigen.Rd index 9f62815..13c497c 100644 --- a/man/measure_centralities_eigen.Rd +++ b/man/measure_centralities_eigen.Rd @@ -10,7 +10,7 @@ tie_by_eigenvector(.data, normalized = TRUE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -30,7 +30,7 @@ network. All measures attempt to use as much information as they are offered, including whether the networks are directed, weighted, or multimodal. If this would produce unintended results, -first transform the salient properties using e.g. \code{\link[manynet:modif_direction]{manynet::to_undirected()}} functions. +first transform the salient properties using e.g. \code{\link[manynet:to_undirected]{to_undirected()}} functions. All centrality and centralization measures return normalized measures by default, including for two-mode networks. } @@ -38,11 +38,11 @@ by default, including for two-mode networks. tie_by_eigenvector(ison_adolescents) } \seealso{ -Other eigenvector: +Other eigenvector: \code{\link{measure_central_eigen}}, \code{\link{measure_centralisation_eigen}} -Other centrality: +Other centrality: \code{\link{measure_central_between}}, \code{\link{measure_central_close}}, \code{\link{measure_central_degree}}, @@ -55,7 +55,7 @@ Other centrality: \code{\link{measure_centralities_close}}, \code{\link{measure_centralities_degree}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -87,7 +87,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other tie: +Other tie: \code{\link{mark_dyads}}, \code{\link{mark_select_tie}}, \code{\link{mark_ties}}, diff --git a/man/measure_closure.Rd b/man/measure_closure.Rd index 47059b8..1bcf93a 100644 --- a/man/measure_closure.Rd +++ b/man/measure_closure.Rd @@ -19,7 +19,7 @@ net_by_congruency(.data, object2) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{method}{For reciprocity, either \code{default} or \code{ratio}. See \code{?igraph::reciprocity}} @@ -81,7 +81,7 @@ Cambridge University Press. Cambridge University Press. } } \seealso{ -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_closure_node.Rd b/man/measure_closure_node.Rd index de61d03..6587893 100644 --- a/man/measure_closure_node.Rd +++ b/man/measure_closure_node.Rd @@ -16,7 +16,7 @@ node_by_equivalency(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_measure} numeric vector the length of the nodes in the network, @@ -46,7 +46,7 @@ node_by_reciprocity(to_unweighted(ison_networkers)) node_by_transitivity(ison_adolescents) } \seealso{ -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -78,7 +78,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_cohesion.Rd b/man/measure_cohesion.Rd index d9ca18e..e08fac5 100644 --- a/man/measure_cohesion.Rd +++ b/man/measure_cohesion.Rd @@ -16,7 +16,7 @@ net_by_independence(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{network_measure} numeric score. @@ -46,14 +46,14 @@ net_by_density(ison_southern_women) net_by_independence(ison_adolescents) } \seealso{ -Other cohesion: +Other cohesion: \code{\link{mark_triangles}}, \code{\link{measure_breadth}}, \code{\link{measure_fragmentation}}, \code{\link{motif_net}}, \code{\link{motif_node}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_core.Rd b/man/measure_core.Rd index 02984d5..ee52bdd 100644 --- a/man/measure_core.Rd +++ b/man/measure_core.Rd @@ -13,7 +13,7 @@ node_by_coreness(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_measure} numeric vector the length of the nodes in the network, @@ -57,11 +57,11 @@ Batagelj, Vladimir, and Matjaz Zaversnik. 2003. } } \seealso{ -Other core-periphery: +Other core-periphery: \code{\link{mark_core}}, \code{\link{member_core}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -93,7 +93,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_diffusion_infection.Rd b/man/measure_diffusion_infection.Rd index ddd3322..9025b09 100644 --- a/man/measure_diffusion_infection.Rd +++ b/man/measure_diffusion_infection.Rd @@ -52,7 +52,7 @@ highest infection rate is observed. net_by_infection_peak(smeg_diff) } \seealso{ -Other diffusion: +Other diffusion: \code{\link{mark_diff}}, \code{\link{measure_diffusion_net}}, \code{\link{measure_diffusion_node}}, @@ -60,7 +60,7 @@ Other diffusion: \code{\link{motif_exposure}}, \code{\link{motif_hazard}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_diffusion_net.Rd b/man/measure_diffusion_net.Rd index c274efd..6a8b6fb 100644 --- a/man/measure_diffusion_net.Rd +++ b/man/measure_diffusion_net.Rd @@ -168,7 +168,7 @@ Garnett, G.P. 2005. } } \seealso{ -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -200,7 +200,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other diffusion: +Other diffusion: \code{\link{mark_diff}}, \code{\link{measure_diffusion_infection}}, \code{\link{measure_diffusion_node}}, diff --git a/man/measure_diffusion_node.Rd b/man/measure_diffusion_node.Rd index 1e764ec..c002917 100644 --- a/man/measure_diffusion_node.Rd +++ b/man/measure_diffusion_node.Rd @@ -19,7 +19,7 @@ node_by_adopt_exposure(.data, mark, time = 0) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{normalized}{Logical scalar, whether scores are normalized. Different denominators may be used depending on the measure, @@ -121,7 +121,7 @@ Valente, Tom W. 1995. \emph{Network models of the diffusion of innovations} } } \seealso{ -Other diffusion: +Other diffusion: \code{\link{mark_diff}}, \code{\link{measure_diffusion_infection}}, \code{\link{measure_diffusion_net}}, @@ -129,7 +129,7 @@ Other diffusion: \code{\link{motif_exposure}}, \code{\link{motif_hazard}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -161,7 +161,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_diverse_net.Rd b/man/measure_diverse_net.Rd index 3d1bf9d..fad0bfc 100644 --- a/man/measure_diverse_net.Rd +++ b/man/measure_diverse_net.Rd @@ -17,7 +17,7 @@ net_by_diversity( \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{attribute}{Name of a nodal attribute, mark, measure, or membership vector.} @@ -137,12 +137,12 @@ Princeton: Princeton University Press. } } \seealso{ -Other diversity: +Other diversity: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_diverse_node}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_diverse_node.Rd b/man/measure_diverse_node.Rd index bab59e0..5ed6059 100644 --- a/man/measure_diverse_node.Rd +++ b/man/measure_diverse_node.Rd @@ -17,7 +17,7 @@ node_by_diversity( \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{attribute}{Name of a nodal attribute, mark, measure, or membership vector.} @@ -52,12 +52,12 @@ node_by_diversity(marvel_friends, "Gender") node_by_diversity(marvel_friends, "Attractive") } \seealso{ -Other diversity: +Other diversity: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_diverse_net}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -89,7 +89,7 @@ Other measures: \code{\link{measure_hierarchy}}, \code{\link{measure_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/measure_features.Rd b/man/measure_features.Rd index 0e51fb5..5efa3de 100644 --- a/man/measure_features.Rd +++ b/man/measure_features.Rd @@ -35,7 +35,7 @@ net_by_balance(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{mark}{A logical vector indicating which nodes belong to the core.} @@ -239,7 +239,7 @@ Cartwright, D., and Frank Harary. 1956. \code{\link[=net_by_transitivity]{net_by_transitivity()}} and \code{\link[=net_by_equivalency]{net_by_equivalency()}} for how clustering is calculated -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_fragmentation.Rd b/man/measure_fragmentation.Rd index e66b77f..c01b398 100644 --- a/man/measure_fragmentation.Rd +++ b/man/measure_fragmentation.Rd @@ -19,7 +19,7 @@ net_by_toughness(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{network_measure} numeric score. @@ -56,14 +56,14 @@ White, Douglas R and Frank Harary. 2001. } } \seealso{ -Other cohesion: +Other cohesion: \code{\link{mark_triangles}}, \code{\link{measure_breadth}}, \code{\link{measure_cohesion}}, \code{\link{motif_net}}, \code{\link{motif_node}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/measure_hierarchy.Rd b/man/measure_hierarchy.Rd index 6840d3a..33e4107 100644 --- a/man/measure_hierarchy.Rd +++ b/man/measure_hierarchy.Rd @@ -16,7 +16,7 @@ net_by_upperbound(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{network_measure} numeric score. @@ -53,7 +53,7 @@ Everett, Martin, and David Krackhardt. 2012. } } \seealso{ -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, @@ -85,7 +85,7 @@ Other measures: \code{\link{measure_fragmentation}}, \code{\link{measure_periods}} -Other hierarchy: +Other hierarchy: \code{\link{motif_hierarchy}} } \concept{hierarchy} diff --git a/man/measure_periods.Rd b/man/measure_periods.Rd index 359a4f2..52ed594 100644 --- a/man/measure_periods.Rd +++ b/man/measure_periods.Rd @@ -10,7 +10,7 @@ net_by_waves(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{network_measure} numeric score. @@ -19,10 +19,10 @@ A \code{network_measure} numeric score. \code{net_by_waves()} measures the number of waves in longitudinal network data. } \seealso{ -Other change: +Other change: \code{\link{motif_periods}} -Other measures: +Other measures: \code{\link{measure_assort_net}}, \code{\link{measure_assort_node}}, \code{\link{measure_breadth}}, diff --git a/man/member_brokerage.Rd b/man/member_brokerage.Rd index cc3c189..695cc59 100644 --- a/man/member_brokerage.Rd +++ b/man/member_brokerage.Rd @@ -10,7 +10,7 @@ node_in_brokering(.data, membership) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{membership}{A character string naming an existing node attribute in the network, or a categorical vector of the same length as the number of @@ -40,14 +40,14 @@ and their application to multi-level environmental governance networks" } } \seealso{ -Other brokerage: +Other brokerage: \code{\link{measure_broker_node}}, \code{\link{measure_broker_tie}}, \code{\link{measure_brokerage}}, \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}} -Other memberships: +Other memberships: \code{\link{member_cliques}}, \code{\link{member_community}}, \code{\link{member_community_hier}}, @@ -57,7 +57,7 @@ Other memberships: \code{\link{member_diffusion}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/member_cliques.Rd b/man/member_cliques.Rd index c31442c..5328a03 100644 --- a/man/member_cliques.Rd +++ b/man/member_cliques.Rd @@ -10,7 +10,7 @@ node_in_roulette(.data, num_groups, group_size, times = NULL) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{num_groups}{An integer indicating the number of groups desired.} @@ -79,7 +79,7 @@ Lai, Xiangjing, Jin-Kao Hao, Zhang-Hua Fu, and Dong Yue. 2021. } } \seealso{ -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_community}}, \code{\link{member_community_hier}}, @@ -89,7 +89,7 @@ Other memberships: \code{\link{member_diffusion}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/member_community.Rd b/man/member_community.Rd index ad62e5b..9d0debb 100644 --- a/man/member_community.Rd +++ b/man/member_community.Rd @@ -10,7 +10,7 @@ node_in_community(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_member} character vector the length of the nodes in the network, @@ -30,11 +30,11 @@ finds the algorithm that maximises modularity and returns that membership vector. } \seealso{ -Other community: +Other community: \code{\link{member_community_hier}}, \code{\link{member_community_non}} -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_cliques}}, \code{\link{member_community_hier}}, @@ -44,7 +44,7 @@ Other memberships: \code{\link{member_diffusion}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/member_community_hier.Rd b/man/member_community_hier.Rd index 907d4ec..f523d67 100644 --- a/man/member_community_hier.Rd +++ b/man/member_community_hier.Rd @@ -19,7 +19,7 @@ node_in_walktrap(.data, times = 50) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{times}{Integer indicating number of simulations/walks used. By default, \code{times=50}.} @@ -129,7 +129,7 @@ Pons, Pascal, and Matthieu Latapy. 2005. } } \seealso{ -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_cliques}}, \code{\link{member_community}}, @@ -139,7 +139,7 @@ Other memberships: \code{\link{member_diffusion}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -169,7 +169,7 @@ Other nodal: \code{\link{motif_node}}, \code{\link{motif_path}} -Other community: +Other community: \code{\link{member_community}}, \code{\link{member_community_non}} } diff --git a/man/member_community_non.Rd b/man/member_community_non.Rd index 605f6d0..eadc5e0 100644 --- a/man/member_community_non.Rd +++ b/man/member_community_non.Rd @@ -28,7 +28,7 @@ node_in_leiden(.data, resolution = 1) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{times}{Integer indicating number of simulations/walks used. By default, \code{times=50}.} @@ -226,11 +226,11 @@ Traag, Vincent A., Ludo Waltman, and Nees Jan van Eck. 2019. } } \seealso{ -Other community: +Other community: \code{\link{member_community}}, \code{\link{member_community_hier}} -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_cliques}}, \code{\link{member_community}}, @@ -240,7 +240,7 @@ Other memberships: \code{\link{member_diffusion}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/member_components.Rd b/man/member_components.Rd index 02f3bf7..dfba814 100644 --- a/man/member_components.Rd +++ b/man/member_components.Rd @@ -16,7 +16,7 @@ node_in_strong(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_member} character vector the length of the nodes in the network, @@ -47,11 +47,11 @@ Weakly connected components consist of subgraphs where there is a path in either direction between member nodes. } \examples{ -ison_monks \%>\% to_uniplex("esteem") \%>\% +ison_monks |> to_uniplex("esteem") |> mutate_nodes(comp = node_in_component()) } \seealso{ -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_cliques}}, \code{\link{member_community}}, @@ -61,7 +61,7 @@ Other memberships: \code{\link{member_diffusion}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/member_core.Rd b/man/member_core.Rd index e84cd26..0c0e098 100644 --- a/man/member_core.Rd +++ b/man/member_core.Rd @@ -10,7 +10,7 @@ node_in_core(.data, groups = 3, cluster_by = c("bins", "quantiles", "kmeans")) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{groups}{Number of categories to create. Must be at least 2 and at most the number of nodes in the network. Default is 3.} @@ -52,11 +52,11 @@ Wallerstein, Immanuel. 1974. } } \seealso{ -Other core-periphery: +Other core-periphery: \code{\link{mark_core}}, \code{\link{measure_core}} -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_cliques}}, \code{\link{member_community}}, @@ -66,7 +66,7 @@ Other memberships: \code{\link{member_diffusion}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/member_diffusion.Rd b/man/member_diffusion.Rd index 33a2c61..b3b21af 100644 --- a/man/member_diffusion.Rd +++ b/man/member_diffusion.Rd @@ -10,7 +10,7 @@ node_in_adopter(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_member} character vector the length of the nodes in the network, @@ -53,7 +53,7 @@ Valente, Tom W. 1995. } } \seealso{ -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_cliques}}, \code{\link{member_community}}, @@ -63,7 +63,7 @@ Other memberships: \code{\link{member_core}}, \code{\link{member_equivalence}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, @@ -93,7 +93,7 @@ Other nodal: \code{\link{motif_node}}, \code{\link{motif_path}} -Other diffusion: +Other diffusion: \code{\link{mark_diff}}, \code{\link{measure_diffusion_infection}}, \code{\link{measure_diffusion_net}}, diff --git a/man/member_equivalence.Rd b/man/member_equivalence.Rd index 557059e..166bce5 100644 --- a/man/member_equivalence.Rd +++ b/man/member_equivalence.Rd @@ -47,7 +47,7 @@ node_in_automorphic( \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{motif}{A matrix returned by a \verb{node_x_*()} function.} @@ -112,7 +112,7 @@ if(require("sna", quietly = TRUE)){ } } \seealso{ -Other memberships: +Other memberships: \code{\link{member_brokerage}}, \code{\link{member_cliques}}, \code{\link{member_community}}, @@ -122,7 +122,7 @@ Other memberships: \code{\link{member_core}}, \code{\link{member_diffusion}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/method_cluster.Rd b/man/method_cluster.Rd index af3139b..7543fd3 100644 --- a/man/method_cluster.Rd +++ b/man/method_cluster.Rd @@ -24,7 +24,7 @@ Fewer, identifiable letters, e.g. \code{"e"} for Euclidean, is sufficient.} \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A hierarchical clustering object created by \code{stats::hclust()}, diff --git a/man/method_kselect.Rd b/man/method_kselect.Rd index c7abdad..803436a 100644 --- a/man/method_kselect.Rd +++ b/man/method_kselect.Rd @@ -21,7 +21,7 @@ k_gap(hc, motif, Kmax, sims = 100) \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{motif}{A motif census object.} diff --git a/man/motif_brokerage_net.Rd b/man/motif_brokerage_net.Rd index da1c425..07900eb 100644 --- a/man/motif_brokerage_net.Rd +++ b/man/motif_brokerage_net.Rd @@ -10,7 +10,7 @@ net_x_brokerage(.data, membership, standardized = FALSE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{membership}{A character string naming an existing node attribute in the network, or a categorical vector of the same length as the number of @@ -37,14 +37,14 @@ roles in a network. net_x_brokerage(ison_networkers, "Discipline") } \seealso{ -Other brokerage: +Other brokerage: \code{\link{measure_broker_node}}, \code{\link{measure_broker_tie}}, \code{\link{measure_brokerage}}, \code{\link{member_brokerage}}, \code{\link{motif_brokerage_node}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_node}}, \code{\link{motif_exposure}}, \code{\link{motif_hazard}}, diff --git a/man/motif_brokerage_node.Rd b/man/motif_brokerage_node.Rd index 6974482..b75e921 100644 --- a/man/motif_brokerage_node.Rd +++ b/man/motif_brokerage_node.Rd @@ -10,7 +10,7 @@ node_x_brokerage(.data, membership, standardized = FALSE) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{membership}{A character string naming an existing node attribute in the network, or a categorical vector of the same length as the number of @@ -53,14 +53,14 @@ Jasny, Lorien, and Mark Lubell. 2015. } } \seealso{ -Other brokerage: +Other brokerage: \code{\link{measure_broker_node}}, \code{\link{measure_broker_tie}}, \code{\link{measure_brokerage}}, \code{\link{member_brokerage}}, \code{\link{motif_brokerage_net}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_exposure}}, \code{\link{motif_hazard}}, @@ -70,7 +70,7 @@ Other motifs: \code{\link{motif_path}}, \code{\link{motif_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/motif_exposure.Rd b/man/motif_exposure.Rd index 6663aef..df3cde2 100644 --- a/man/motif_exposure.Rd +++ b/man/motif_exposure.Rd @@ -10,7 +10,7 @@ node_x_exposure(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_motif} matrix with one row for each node in the network and @@ -28,7 +28,7 @@ infection/adoption by time step. node_x_exposure(play_diffusion(create_tree(12))) } \seealso{ -Other diffusion: +Other diffusion: \code{\link{mark_diff}}, \code{\link{measure_diffusion_infection}}, \code{\link{measure_diffusion_net}}, @@ -36,7 +36,7 @@ Other diffusion: \code{\link{member_diffusion}}, \code{\link{motif_hazard}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}}, \code{\link{motif_hazard}}, @@ -46,7 +46,7 @@ Other motifs: \code{\link{motif_path}}, \code{\link{motif_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/motif_hazard.Rd b/man/motif_hazard.Rd index 0170ba7..55abf68 100644 --- a/man/motif_hazard.Rd +++ b/man/motif_hazard.Rd @@ -13,7 +13,7 @@ net_x_hazard(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{network_motif} named numeric vector or sometimes a data frame with @@ -87,7 +87,7 @@ Cambridge: MIT Press. } } \seealso{ -Other diffusion: +Other diffusion: \code{\link{mark_diff}}, \code{\link{measure_diffusion_infection}}, \code{\link{measure_diffusion_net}}, @@ -95,7 +95,7 @@ Other diffusion: \code{\link{member_diffusion}}, \code{\link{motif_exposure}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}}, \code{\link{motif_exposure}}, diff --git a/man/motif_hierarchy.Rd b/man/motif_hierarchy.Rd index 8989a5f..0fa2106 100644 --- a/man/motif_hierarchy.Rd +++ b/man/motif_hierarchy.Rd @@ -10,7 +10,7 @@ net_x_hierarchy(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{network_motif} named numeric vector or sometimes a data frame with @@ -52,10 +52,10 @@ Everett, Martin, and David Krackhardt. 2012. } } \seealso{ -Other hierarchy: +Other hierarchy: \code{\link{measure_hierarchy}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}}, \code{\link{motif_exposure}}, diff --git a/man/motif_net.Rd b/man/motif_net.Rd index b39af77..a861504 100644 --- a/man/motif_net.Rd +++ b/man/motif_net.Rd @@ -22,7 +22,7 @@ net_x_mixed(.data, object2) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{object2}{A second, two-mode network object.} } @@ -172,14 +172,14 @@ Hollway, James, Alessandro Lomi, Francesca Pallotti, and Christoph Stadtfeld. 20 } } \seealso{ -Other cohesion: +Other cohesion: \code{\link{mark_triangles}}, \code{\link{measure_breadth}}, \code{\link{measure_cohesion}}, \code{\link{measure_fragmentation}}, \code{\link{motif_node}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}}, \code{\link{motif_exposure}}, diff --git a/man/motif_node.Rd b/man/motif_node.Rd index 88e2e25..38878b3 100644 --- a/man/motif_node.Rd +++ b/man/motif_node.Rd @@ -16,7 +16,7 @@ node_x_tetrad(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_motif} matrix with one row for each node in the network and @@ -104,14 +104,14 @@ McMillan, Cassie, and Diane Felmlee. 2020. } } \seealso{ -Other cohesion: +Other cohesion: \code{\link{mark_triangles}}, \code{\link{measure_breadth}}, \code{\link{measure_cohesion}}, \code{\link{measure_fragmentation}}, \code{\link{motif_net}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}}, \code{\link{motif_exposure}}, @@ -121,7 +121,7 @@ Other motifs: \code{\link{motif_path}}, \code{\link{motif_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/motif_path.Rd b/man/motif_path.Rd index 6f1909d..66fc660 100644 --- a/man/motif_path.Rd +++ b/man/motif_path.Rd @@ -13,7 +13,7 @@ node_x_path(.data) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} } \value{ A \code{node_motif} matrix with one row for each node in the network and @@ -55,7 +55,7 @@ Opsahl, Tore, Filip Agneessens, and John Skvoretz. 2010. } } \seealso{ -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}}, \code{\link{motif_exposure}}, @@ -65,7 +65,7 @@ Other motifs: \code{\link{motif_node}}, \code{\link{motif_periods}} -Other nodal: +Other nodal: \code{\link{mark_core}}, \code{\link{mark_degree}}, \code{\link{mark_diff}}, diff --git a/man/motif_periods.Rd b/man/motif_periods.Rd index 336b4aa..4dde8b6 100644 --- a/man/motif_periods.Rd +++ b/man/motif_periods.Rd @@ -16,7 +16,7 @@ net_x_correlation(.data, object2) \arguments{ \item{.data}{A network object of class \code{mnet}, \code{igraph}, \code{tbl_graph}, \code{network}, or similar. For more information on the standard coercion possible, -see \code{\link[manynet:coerce_graph]{manynet::as_tidygraph()}}.} +see \code{\link[manynet:as_tidygraph]{manynet::as_tidygraph()}}.} \item{object2}{A network object.} } @@ -38,10 +38,10 @@ These \verb{net_*()} functions return a numeric vector the length of the number of networks minus one. E.g., the periods between waves. } \seealso{ -Other change: +Other change: \code{\link{measure_periods}} -Other motifs: +Other motifs: \code{\link{motif_brokerage_net}}, \code{\link{motif_brokerage_node}}, \code{\link{motif_exposure}}, diff --git a/man/reexports.Rd b/man/reexports.Rd deleted file mode 100644 index 438ecee..0000000 --- a/man/reexports.Rd +++ /dev/null @@ -1,16 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/class_metrics.R -\docType{import} -\name{reexports} -\alias{reexports} -\alias{\%>\%} -\title{Objects exported from other packages} -\keyword{internal} -\description{ -These objects are imported from other packages. Follow the links -below to see their documentation. - -\describe{ - \item{dplyr}{\code{\link[dplyr:reexports]{\%>\%}}} -}} - diff --git a/tests/testthat/test-measure_nodes.R b/tests/testthat/test-measure_nodes.R index 45a8e95..ee8ca29 100644 --- a/tests/testthat/test-measure_nodes.R +++ b/tests/testthat/test-measure_nodes.R @@ -1,3 +1,10 @@ +test_that("node_by_homophily works with vector attribute (e.g. community assignment)", { + attr_vec <- node_in_community(data_objs[["attribute"]]) + result <- node_by_homophily(data_objs[["attribute"]], attr_vec) + expect_s3_class(result, "node_measure") + expect_length(result, manynet::net_nodes(data_objs[["attribute"]])) +}) + node_meas <- funs_objs[grepl("node_by_", names(funs_objs))] for(fn in names(node_meas)) { for (ob in names(data_objs)) {