Learn R Programming

aniSNA (version 1.1.1)

network_from_interactions: Function to obtain a network structure from interactions dataframe

Description

Function to obtain a network structure from interactions dataframe

Usage

network_from_interactions(species_raw, interactions, n_cores = 1)

Value

An object of class igraph

Arguments

species_raw

A dataframe consisting of raw GPS observations. It should have at least four columns namely "animal_id", "datetime", "latitude|_rad", and "longitude_rad". "latitude|_rad", and "longitude_rad" are latitude and longitude values in radians respectively. See function "get_coordinates_in_radian" to get these values.

interactions

A dataframe of interactions obtained from raw GPS observations using the function "get_interactions"

n_cores

Number of cores for parallel processing, default is 1

Examples

Run this code
data(elk_data_2010, elk_interactions_2010)
network_from_interactions(elk_data_2010, elk_interactions_2010)

Run the code above in your browser using DataLab