df_to_list: Convert data frame to a list by animal ID

View source: R/segmentation_helper_functions.R

df_to_listR Documentation

Convert data frame to a list by animal ID

Description

Converts an object of class data.frame to a list where each element is a separate animal ID. This function prepares the data for further analysis and when mapping other functions onto the data for separate animal IDs.

Usage

df_to_list(dat, ind)

Arguments

dat

A data frame containing the data for each animal ID.

ind

character. The name of the column storing the animal IDs.

Value

A list where each element stores the data for a separate animal ID.

Examples

#load data
data(tracks)

#convert to list
dat.list<- df_to_list(dat = tracks, ind = "id")



joshcullen/bayesmove documentation built on Oct. 6, 2023, 3:28 a.m.