subset_dt: Subset data.table by i,j indexes

View source: R/functions_matrix_helpers.R

subset_dtR Documentation

Subset data.table by i,j indexes

Description

efficiently subset data.table as one would a subrange of a matrix

Usage

subset_dt(dt, i_range, j_range, fill_square = FALSE)

Arguments

dt

a data.table containing i, j, and val

i_range

integer, range of i indexes to retrieve

j_range

integer, range of j indexes to retrieve

fill_square

logical, should region spanning below diagonal be filled in?

Value

subset of dt within ranges


jrboyd/dthic documentation built on Oct. 4, 2022, 8:53 p.m.