plot_predictions {target} | R Documentation

## Plot the ECDF of ranks by groups

### Description

Plot the cumulative distribution function of choosen value (e.g. ranks) by a factor of the same lenght, group. Each group is given a color and a label.

### Usage

    plot_predictions(rank, group, colors, labels, ...)

### Arguments

`rank` | A numeric vector
`group` | A factor of length equal that of rank
`colors` | A character vector of colors for each group
`labels` | A character vector of length equal the unique values in groups
`...` | Other arguments passed to points

### Value

NULL.

### Examples

    # generate random values
    rn1 <- rnorm(100)
    rn2 <- rnorm(100, 2)
    e <- c(rn1, rn2)

    # generate grouping variable
    g <- rep(c('up', 'down'), times = c(length(rn1), length(rn2)))

    plot_predictions(e,
                     group = g,
                     colors = c('red', 'green'),
                     labels = c('up', 'down'))

[Package target version 1.2.0 Index]