Experimental 2D and 3D Scatter Plots for Delta-Scale Pairwise Correlations
Source:R/plotfuns.R
delta_scatter.Rd
Experimental 2D and 3D Scatter Plots for Delta-Scale Pairwise Correlations
Usage
delta_scatter(
x,
timediff1 = "2-1",
timediff2 = "3-2",
timediff3 = NULL,
fisherz = TRUE,
interactive = TRUE,
digits = 3
)
Arguments
- x
Input covariate array, with n rows, p columns, and t slices
- timediff1
First pair of time points for the x-axis of the scatter plot. Should be in format
't2-t1'
- timediff2
Second pair of time points for the y-axis of the scatter plot. Should be in format
't2-t1'
- timediff3
Optional third pair of time points for the z-axis of the scatter plot. Should be in format
't2-t1'
- fisherz
If
TRUE
, the Fisher z-transformation (atanh) will be applied to the correlations- interactive
If
TRUE
and timediff3 isNULL
, an interactiveplotly
plot with hover text containing correlations and variable names will be generated. IfFALSE
and timediff3 isNULL
, a regularggplot2
scatterplot will be shown. If timediff3 is provided, this parameter will only determine whether hovertext is shown- digits
Number of digits for rounding in the hovertext
References
Wickham H (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-3-319-24277-4, https://ggplot2.tidyverse.org. Sievert C (2020). Interactive Web-Based Data Visualization with R, plotly, and shiny. Chapman and Hall/CRC. ISBN 9781138331457, https://plotly-r.com.