kappa_trans: BRAID kappa Transforms

View source: R/kappa_trans.R

kappa_transR Documentation

BRAID kappa Transforms

Description

Functions to linearize the BRAID interaction parameter kappa, which ordinarily ranges from -2 to infinity. kappa_trans produces a scales transform object which can be used in ggplot2 continuous scale object. scale_x_kappa and scale_y_kappa are wrappers for scale_x_continuous and scale_y_continuous which set the trans or transform parameter to kappa_trans().

Usage

kappa_trans()

scale_x_kappa(...)

scale_y_kappa(...)

Arguments

...

Additional parameter to be passed to ⁠scale_*_continuous⁠

Value

For kappa_trans a scales transform object. For ⁠scale_*_kappa⁠, a continuous position scale layer for a ggplot object.

Examples

transform <- kappa_trans()

transform$transform(c(-1.96, 100))
transform$inverse(c(-1, 1))

data <- merckValues_stable
ggplot(data,aes(x=kappa))+
    geom_density()+
    scale_x_kappa("BRAID kappa")

braidReports documentation built on Sept. 30, 2024, 1:06 a.m.