Learn R Programming

runner (version 0.3.7)

this_group: Access group data in mutate

Description

Access group data in dplyr::mutate after dplyr::group_by. Function created because data available in dplyr::group_by %>% mutate scheme is not filtered by group - in mutate function . is still initial dataset. This function creates data.frame using dplyr::groups information.

Usage

this_group(x)

Arguments

x

(data.frame) object which can be grouped_df in special case.

Value

data.frame filtered by current dplyr::groups()