Replace data columns with the values the modules plot for them
Source:R/plot_helpers.R
as_plotted.RdApplies 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).
Arguments
- df
Data frame.
- cols
Character vector of column names to transform. Names not in
dfare ignored.- adjustment, adj.fxn
Passed to
adjusted_values().
Examples
as_plotted(data.frame(y = c(1, 10, 100)), "y", adjustment = "z-score", adj.fxn = "log10")
#> y
#> 1 -1
#> 2 0
#> 3 1