View source: R/utilities-mapping.R
getLinesFromFoldDistance | R Documentation |
Get list of values to provide to lines
argument of dataMapping
objects.
The lines
are internally used as argument of geom_hline
and geom_abline
from ggplot2
getLinesFromFoldDistance(foldDistance)
foldDistance |
Numeric values
Caution: this argument is meant for log scaled plots and since fold distance is a ratio it is expected positive.
In particular, line of identity corresponds to a |
A list of numeric values
# Get lines for identity and 2-fold distance
getLinesFromFoldDistance(c(1, 2))
# Create dataMapping with lines identity and 2-fold distance
dataMapping <- ObsVsPredDataMapping$new(
x = "predicted",
y = "observed",
lines = getLinesFromFoldDistance(c(1, 2))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.