droplevels: Drop unused levels from factors

Description Usage Arguments Value Note Examples

Description

The function droplevels is used to drop unused levels from a factor or, more commonly, from factors in a data frame.

Usage

1
2
3
4
5
6
7
droplevels(x, ...)

## S4 method for signature 'DataFrame'
droplevels(x)

## S4 method for signature 'Ranges'
droplevels(x)

Arguments

x

Object.

...

Additional arguments.

Value

Modified object.

Note

Updated 2021-02-03.

Examples

1
2
3
4
5
6
data(GRanges, package = "AcidTest")

## Ranges ====
object <- GRanges
object <- droplevels(object)
print(object)

acidgenomics/pipette documentation built on Sept. 27, 2021, 9:10 a.m.