Skip to contents

This function recalculates pellets if given a FED_data data.frame that contains an identifier column. The main reason behind it is that one animal can receive more than one FED device. This might happen due to the experiment design or because a FED needed to be replaced during the experiment. Alternatively, it could be used to analyze several datasets coming from different animals independent of Device_Number.

Usage

recalculate_pellets(df, group_var = NULL)

Arguments

df

A data frame containing FED data. If your data.frame is grouped, group_var will be disregarded.

group_var

A string specifying the column to group by. If NULL (default), no grouping is performed.

Value

A data frame identical to df but with recalculated pellet counts and arranged by datetime.