Attempts to figure out appropriate labels for S4 classes.
S4LabelFormat(x, type = "major", ...) # S4 method for ANY S4LabelFormat(x, type = "major", ...) # S4 method for WoodenHorse S4LabelFormat(x, type = "major", ...) # S4 method for ANYGenomic S4LabelFormat(x, type = "major", ...)
x | A vector to format |
---|---|
type | Either |
... | Optional arguments passed to downstream functions (not implemented). |
A character
vector of the same length as x
with labels
The type
argument is currently only implemented for the
GenomicRanges class.
# Regular atomic vectors S4LabelFormat(1:10)#> [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"S4LabelFormat(LETTERS[1:5])#> [1] "A" "B" "C" "D" "E"#> [1] "chr1" "chr1" "chr1" "chr1" "chr1" "chr1" "chr1" "chr1" "chr1" "chr1"# GenomicRanges minor labels are positions formatted as basepairs S4LabelFormat(GPos("chr1", 1:10), type = "minor")#> [1] "1 " "2 " "3 " "4 " "5 " "6 " "7 " "8 " "9 " "10"