get_row_group_by {dataMojo}R Documentation

Fetch one row from each grouped by group

Description

Fetch one row from each grouped by group

Usage

get_row_group_by(dt, group_by_cols, fetch_row)

Arguments

dt

input data table

group_by_cols

group by columns

fetch_row

first means to fetch first row and last means to fetch last row

Value

grouped by data table

Examples

data("dt_groups")
dataMojo::get_row_group_by(dt_groups,
                           group_by_cols = c("group1", "group2"),
                           fetch_row = "first")

[Package dataMojo version 1.0.0 Index]