R/axis.ticks.R

Defines functions get.default.yat prep.yat

prep.yat <- function(yat) {
    if (!is.list(yat)) {
        if (!is.null(yat)) {
            warning(paste(
                '"yat" should be a list.',
                'Default axis ticks will be used.'
                ));
            }

        yat <- list();
        }

    return(yat);
    }

get.default.yat <- function(max.y, conversion.factor) {
    scaled.max <- max.y * conversion.factor;

    labels <- Filter(
        function(x) {
            x <= scaled.max;
            },
        pretty(seq(0, scaled.max))
        );
    }

Try the CancerEvolutionVisualization package in your browser

Any scripts or data that you put into this service are public.

CancerEvolutionVisualization documentation built on Nov. 22, 2023, 1:08 a.m.