Title: | Package Accompanying: The Problem And Promise Of Scale In Multilayer Animal Social Networks. |
---|---|
Description: | Scale remains a foundational concept in ecology. Spatial scale, for instance, has become a central consideration in the way we understand landscape ecology and animal space use. Meanwhile, scale-dependent social processes can range from fine-scale interactions to co-occurrence and overlapping home ranges. Furthermore, sociality can vary within and across seasons. Multilayer networks promise the explicit integration of the social, spatial and, temporal contexts. Given the complex interplay of sociality and animal space use in heterogeneous landscapes, there remains an important gap in our understanding of the influence of scale on animal social networks. Using an empirical case study, we discuss ways of considering social, spatial and, temporal scale in the context of multilayer caribou social networks. Effective integration of social and spatial processes, including biologically meaningful scales, within the context of animal social networks is an emerging area of research. We incorporate perspectives that link the social environment to spatial processes across scales in a multilayer context. |
Authors: | Alec L. Robitaille [aut, cre] |
Maintainer: | Alec L. Robitaille <[email protected]> |
License: | GPL-3 | file LICENSE |
Version: | 0.1.1 |
Built: | 2024-11-20 03:03:59 UTC |
Source: | https://github.com/robitalec/ScaleInMultilayerNetworks |
Edge overlap
edge_overlap(edges)
edge_overlap(edges)
graphLs |
Layer A vs Layer B, count overlap
edge_overlap_mat(edges)
edge_overlap_mat(edges)
edges |
Number of neighbors adjacent to each actor. Calculated excluding self from set of neighbors.
layer_neighbors(DT, id, splitBy = NULL)
layer_neighbors(DT, id, splitBy = NULL)
DT |
a data.table with column "group" generated by spatsoc::group_pts |
id |
|
splitBy |
the column which defines the layers of the network |
The input DT with additional column "neigh" and optionally "splitNeigh" if a column was provided for the 'splitBy' argument.
# Load data.table and spatsoc library(data.table) library(spatsoc) # Read example data DT <- fread(system.file("extdata", "DT.csv", package = "spatsoc")) # Cast the character column to POSIXct DT[, datetime := as.POSIXct(datetime, tz = 'UTC')] # Temporal grouping group_times(DT, datetime = 'datetime', threshold = '20 minutes') # Spatial grouping with timegroup group_pts(DT, threshold = 5, id = 'ID', coords = c('X', 'Y'), timegroup = 'timegroup') # Pseudo-season DT[, season := sample(c(1, 2), .N, replace = TRUE)] layer_neighbors(DT, 'ID', splitBy = 'season')
# Load data.table and spatsoc library(data.table) library(spatsoc) # Read example data DT <- fread(system.file("extdata", "DT.csv", package = "spatsoc")) # Cast the character column to POSIXct DT[, datetime := as.POSIXct(datetime, tz = 'UTC')] # Temporal grouping group_times(DT, datetime = 'datetime', threshold = '20 minutes') # Spatial grouping with timegroup group_pts(DT, threshold = 5, id = 'ID', coords = c('X', 'Y'), timegroup = 'timegroup') # Pseudo-season DT[, season := sample(c(1, 2), .N, replace = TRUE)] layer_neighbors(DT, 'ID', splitBy = 'season')
Proportion of neighbours present on each layer.
layer_relevance(DT, id, splitBy)
layer_relevance(DT, id, splitBy)
DT |
|
id |
|
splitBy |
|
var |
Berlingerio, Michele, et al. "Foundations of multidimensional network analysis." 2011 international conference on advances in social networks analysis and mining. IEEE, 2011.
Calculate graph strength for each graph in a list
layer_strength(graphLs)
layer_strength(graphLs)
graphLs |
GBI
list_gbi(DT, id, splitBy, group = "group")
list_gbi(DT, id, splitBy, group = "group")
DT |
|
id |
|
splitBy |
|
group |
|
splitList |
Graphs
list_graphs(netLs, mode = "undirected", diag = FALSE, weighted = TRUE)
list_graphs(netLs, mode = "undirected", diag = FALSE, weighted = TRUE)
netLs |
|
mode |
|
diag |
|
weighted |
Networks
list_nets(gbiLs, format = "GBI", ai = "SRI")
list_nets(gbiLs, format = "GBI", ai = "SRI")
gbiLs |
|
format |
|
ai |
Multidegree
multi_degree(DT, degree, id, splitBy)
multi_degree(DT, degree, id, splitBy)
DT |
|
degree |
|
id |
Column added named multideg
Property Matrix
property_matrix(DT, id, metric, by, layer = "layer")
property_matrix(DT, id, metric, by, layer = "layer")
DT |
|
id |
|
metric |
|
by |
|
layer |
Bródka P, Chmiel A,Magnani M, Ragozini G. 2018 Quantifying layer similarity in multiplex networks: a systematic study. R.Soc.opensci. 5:171747. http://dx.doi.org/10.1098/rsos.171747
Shear XY for stacked plotting Thanks to [@rafapereirabr](https://github.com/rafapereirabr) for this gist (https://gist.github.com/rafapereirabr/97a7c92d40f91cd20a10e8e0165a0aef) and Barry Rowlingson for the original SO answer (http://gis.stackexchange.com/questions/189490/plot-tilted-map-in-r)
shear_xy(DT, coordcols, shearmatrix = matrix(c(2, 1.2, 0, 1), 2, 2))
shear_xy(DT, coordcols, shearmatrix = matrix(c(2, 1.2, 0, 1), 2, 2))
DT |
|
coordcols |
length 2 |
shearmatrix |