create_grps {bp}R Documentation

Create Groups for Dplyr

Description

Used in the following functions: arv, bp_mag, bp_range, cv, sv, bp_center, bp_stats

Usage

create_grps(data, inc_date, add_groups, inc_wake)

Arguments

data

Supplied data from function

inc_date

TRUE/FALSE indicator from function argument for whether or not to include the date in grouping

add_groups

Character vector from function argument input corresponding to which other variables other than "ID", "WAKE", and "VISIT" to include from the supplied data's column names. If "DATE" is supplied in add_groups, and inc_date = TRUE, the duplicate will be omitted.

inc_wake

Optional argument corresponding to whether or not to include WAKE in the grouping of the final output (if WAKE column is available). By default, inc_wake = TRUE which will include the WAKE column in the groups by which to calculate the respective metrics.

Value

A vector of string values corresponding to the column names that will subset / group the data in dplyr functions


[Package bp version 2.1.0 Index]