rows.above.pct: Number or percent of rows (for each col) where value exceeds...

View source: R/rows.above.pct.R

rows.above.pctR Documentation

Number or percent of rows (for each col) where value exceeds cutoff(s)

Description

Alias for pct.above()

Usage

rows.above.pct(
  df,
  benchmarks = "mean",
  benchnames = "cutoff",
  na.rm = FALSE,
  or.tied = FALSE,
  below = FALSE,
  wts = 1,
  of.what = "all"
)

Arguments

df

Data.frame or matrix, required.

benchmarks

Default is 'mean' but otherwise this must be a number or numeric vector of thresholds to compare values to.

benchnames

Default is 'cutoff' and this string is used to create colnames for the results, such as above.cutoff.for.field1

na.rm

Logical value, optional, TRUE by default. Defines whether NA values should be removed before value is found. Otherwise result will be NA when any NA is in a col.

or.tied

Logical, FALSE by default, reporting on those > cutoff. But, if or.tied=TRUE, this reports on those >= cutoff.

below

Logical, FALSE by default, which counts how many are above cutoff (or tied if or.tied). If TRUE, counts how many are below (or tied with) cutoff.

wts

Number or vector, default is 1. Length must be a factor of # rows in df, so length(df[,1]) is an integer multiple of length(wts) Applies weights to when counting how many.

of.what

Optional, character, 'all' by default, defines xxx as the text used in "pct.above.xxx" (or below) for fieldnames in results

Value

Returns a vector of numbers of length equal to number of columns in df.

See Also

count.above() pct.above() pct.below() to see, for each column, the count or percent of rows that have values above or below a cutoff.

cols.above.count() cols.above.which() cols.above.pct() to see, for each row, the count or which or fraction of columns with numbers at/above/below cutoff.

colcounter_summary() colcounter_summary_cum() colcounter_summary_pct() colcounter_summary_cum_pct() tablefixed()


ejanalysis/analyze.stuff documentation built on April 2, 2024, 10:10 a.m.