df.remove.empty.rows.and.columns: Remove empty rows and columns from a data frame.

View source: R/CodeAndRoll2.R

df.remove.empty.rows.and.columnsR Documentation

Remove empty rows and columns from a data frame.

Description

This function takes a data frame and a threshold value, and removes all rows and columns that contain only zeros or the threshold value.

Usage

df.remove.empty.rows.and.columns(
  df = UVI.assignment.filtered.3.HF,
  suffix = substitute_deparse(df),
  rows = "rows",
  cols = "cols",
  thr.cell.empty = 0,
  plot_stats = TRUE,
  ...
)

Arguments

df

A data frame.

suffix

A suffix to add to the plot titles.

rows

The name of the variable that will store the fraction of rows that were removed.

cols

The name of the variable that will store the fraction of columns that were removed.

thr.cell.empty

The threshold value below a cell is considered "empty".

plot_stats

Whether to plot the fraction of rows and columns that were removed.

...

Additional arguments to pass to qbarplot.

Value

A data frame with the empty rows and columns removed.


vertesy/CodeAndRoll2 documentation built on Nov. 20, 2024, 5:23 a.m.