Learn R Programming

cytofan (version 0.1.1)

do_fan: Compute summary statistics for stat_fan

Description

Extracts the limits of the Ntiles of a distribution for use in the stat_fan function

Usage

do_fan(x, step = 0.01)

Value

a data.frame containing

  • ymin : the lower limit of the quantile

  • ymax : the upper limit of the quantile

  • id : an identifier for the quantile

  • percent : the fill color to use in geom_fan

Arguments

x

the value to summarize

step

the number of bins to break the data into, based on the quantile function

Examples

Run this code
FanEuStockMarkets <- lapply(colnames(EuStockMarkets),function(id) {
    res <- do_fan(EuStockMarkets[,id])
    res$id <- id
    return(res)
})
FanEuStockMarkets <- do.call(rbind,FanEuStockMarkets)

Run the code above in your browser using DataLab