S4LabelFormat: Format labels for S4 classes

Description Usage Arguments Details Value Examples

Description

Attempts to figure out appropriate labels for S4 classes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
S4LabelFormat(x, type = "major", ...)

## S4 method for signature 'ANY'
S4LabelFormat(x, type = "major", ...)

## S4 method for signature 'WoodenHorse'
S4LabelFormat(x, type = "major", ...)

## S4 method for signature 'ANYGenomic'
S4LabelFormat(x, type = "major", ...)

Arguments

x

A vector to format

type

Either "major" or "minor" to determine how to format the labels (default: "major").

...

Optional arguments passed to downstream functions (not implemented).

Details

The type argument is currently only implemented for the GenomicRanges class.

Value

A character vector of the same length as x with labels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Regular atomic vectors
S4LabelFormat(1:10)
S4LabelFormat(LETTERS[1:5])

require(GenomicRanges)
# GenomicRanges major labels are seqnames
S4LabelFormat(GPos("chr1", 1:10))

# GenomicRanges minor labels are positions formatted as basepairs
S4LabelFormat(GPos("chr1", 1:10), type = "minor")

teunbrand/ggnomics documentation built on Aug. 2, 2020, 7:34 p.m.