HideEmptyRowsAndColumns: Hide Empty Entries From a Table Or Vector

View source: R/hideemptyrowsandcolumns.R

HideEmptyRowsAndColumnsR Documentation

Hide Empty Entries From a Table Or Vector

Description

Searches for empty rows or columns in a table and returns a copy with those entries removed

Usage

HideEmptyRowsAndColumns(x, is.percent = NULL)

Arguments

x

matrix; vector; or list

is.percent

logical; indicating whether the supplied data are percentages; specifying a value of NULL (the default) means that the function will check for an attribute of x called "statistic" to check for percentages

Value

x with any empty rows or columns removed; or in the case x is vector, x with any empty entries removed

See Also

GetNonEmptyRowsAndColumns

Examples

x <- matrix(nrow = 2, ncol = 2)
x[1, ] <- 1
HideEmptyRowsAndColumns(x)
x[2, ] <- 0
HideEmptyRowsAndColumns(x, is.percent = TRUE)

NumbersInternational/flipTables documentation built on Feb. 26, 2024, 6:42 a.m.