Skip to contents

Applies adjusted_values() to each of cols in place, keeping the column names. Each column is transformed on its own over the whole frame, as dittoViz does before any row subsetting or multi-variable reshape, so the result can be passed wherever the raw frame was (statistics, model formulas that name the raw columns, axis-range calculations).

Usage

as_plotted(df, cols, adjustment = NULL, adj.fxn = NULL)

Arguments

df

Data frame.

cols

Character vector of column names to transform. Names not in df are ignored.

adjustment, adj.fxn

Passed to adjusted_values().

Value

df with cols transformed; unchanged when neither argument is set.

Author

Jared Andrews

Examples

as_plotted(data.frame(y = c(1, 10, 100)), "y", adjustment = "z-score", adj.fxn = "log10")
#>    y
#> 1 -1
#> 2  0
#> 3  1