Package 'ScaleInMultilayerNetworks'

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

Help Index


Edge overlap

Description

Edge overlap

Usage

edge_overlap(edges)

Arguments

graphLs

Edge overlap matrix

Description

Layer A vs Layer B, count overlap

Usage

edge_overlap_mat(edges)

Arguments

edges

Neighbourhood

Description

Number of neighbors adjacent to each actor. Calculated excluding self from set of neighbors.

Usage

layer_neighbors(DT, id, splitBy = NULL)

Arguments

DT

a data.table with column "group" generated by spatsoc::group_pts

id
splitBy

the column which defines the layers of the network

Value

The input DT with additional column "neigh" and optionally "splitNeigh" if a column was provided for the 'splitBy' argument.

Examples

# 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')

Relevance

Description

Proportion of neighbours present on each layer.

Usage

layer_relevance(DT, id, splitBy)

Arguments

DT
id
splitBy
var

References

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

Description

Calculate graph strength for each graph in a list

Usage

layer_strength(graphLs)

Arguments

graphLs

Edge lists

Description

Edge lists

Usage

list_edges(graphLs)

Arguments

edgeLs

GBI

Description

GBI

Usage

list_gbi(DT, id, splitBy, group = "group")

Arguments

DT
id
splitBy
group
splitList

Graphs

Description

Graphs

Usage

list_graphs(netLs, mode = "undirected", diag = FALSE, weighted = TRUE)

Arguments

netLs
mode
diag
weighted

Networks

Description

Networks

Usage

list_nets(gbiLs, format = "GBI", ai = "SRI")

Arguments

gbiLs
format
ai

Multidegree

Description

Multidegree

Usage

multi_degree(DT, degree, id, splitBy)

Arguments

DT
degree
id

Value

Column added named multideg


Property Matrix

Description

Property Matrix

Usage

property_matrix(DT, id, metric, by, layer = "layer")

Arguments

DT
id
metric
by
layer

References

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)

Description

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)

Usage

shear_xy(DT, coordcols, shearmatrix = matrix(c(2, 1.2, 0, 1), 2, 2))

Arguments

DT
coordcols

length 2

shearmatrix