grid_summary_tri: Form Counts for Three Grid Areas

View source: R/GridProcessing.R

grid_summary_triR Documentation

Form Counts for Three Grid Areas

Description

Returns the total cell counts for each of three grid regions: above the diagonal, on the diagonal, and below the diagonal. (The diagonal may include the off-diagonals.)

Usage

grid_summary_tri(
  mat,
  rows = NULL,
  cols = NULL,
  offdiag = 0,
  return_table = TRUE,
  limesurvey = TRUE
)

Arguments

mat

a matrix.

rows, cols

the dimensions of the matrix.

offdiag

integer. the number of off-diagonals to treat as part of the diagonal.

return_table

logical. If TRUE the function returns a table rather than a list.

limesurvey

logical. If FALSE the function uses the sum of the diagonal from bottom-left to top-right.

Value

A list (or table) containing the grid cell counts for each of three categories: above the diagonal, on the diagonal, and below the diagonal.


douglaswhitaker/GridItemTools documentation built on Aug. 2, 2022, 4:32 a.m.