Learn R Programming

servosphereR (version 0.1.1)

summaryNetDisplacement: Calculate net displacement

Description

Calculate the net displacement for a path taken by an organism

Usage

summaryNetDisplacement(list, summary.df = NA)

Arguments

list

A list of data frames, each of which has a column representing dx and dy.

summary.df

The data frame object within which you are storing path summary variables. The default is NA if you do not currently have a summary data frame object started. When set to NA the function will create a new summary data frame. When an object is provided, the function will merge the summary data frame with the new data.

Value

A named vector of numbers where each number corresponds to the net displacement of a movement path. The numbers are ordered and named as they are in the data frames list.

Details

Net displacement is the distance between the start of a path and the end of a path. This function calculates the net displacement for a path recorded from the servosphere.