Learn R Programming

ggpmisc (version 0.6.0)

FC_format: Formatter for fold change tick labels

Description

Generate tick labels discounting a log transformation in data, and optionally applying a different log transformation or no transformation.

Usage

FC_format(log.base.data = 2, log.base.labels = 10, digits = 3, ...)

FC_plain( x, log.base.data = 2, log.base.labels = 10, digits = 3, fmt = "%+.*g", ... )

Value

a function with single parameter x, a numeric vector, that returns a character vector.

Arguments

log.base.data

of data.

log.base.labels

of labels.

digits

number of significant digits to show.

...

other arguments passed on to format.

x

a numeric vector to format.

fmt

character string containing the format for one number using * for the precision.

See Also

Other Functions for quadrant and volcano plots: outcome2factor(), scale_colour_outcome(), scale_shape_outcome(), scale_y_Pvalue(), xy_outcomes2factor()

Examples

Run this code

FC_format(2, 10)(1:5)
FC_format(0, 2)(c(1/4, 1/2, 1,2,4,8))
FC_format(10, 0)(-1:3)
FC_format(0, 10)(c(0.1, 1, 10, 100, 100))

Run the code above in your browser using DataLab