Simplify y-limits
This commit is contained in:
@@ -664,18 +664,14 @@ generate_interaction_plot_configs <- function(df, variables) {
|
|||||||
|
|
||||||
configs <- list()
|
configs <- list()
|
||||||
|
|
||||||
limits_map <- list(
|
# Set the y-limits for each variable
|
||||||
L = c(-65, 65),
|
|
||||||
K = c(-65, 65),
|
|
||||||
r = c(-0.65, 0.65),
|
|
||||||
AUC = c(-6500, 6500)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Filtering out NAs and outlying values
|
|
||||||
df_filtered <- df %>%
|
df_filtered <- df %>%
|
||||||
filter(across(names(limits_map),
|
filter(
|
||||||
~ !is.na(.x) &
|
!is.na(L) & between(L, -65, 65),
|
||||||
between(.x, limits_map[[.names]][1], limits_map[[.names]][2])))
|
!is.na(K) & between(K, -65, 65),
|
||||||
|
!is.na(r) & between(r, -0.65, 0.65),
|
||||||
|
!is.na(AUC) & between(AUC, -6500, 6500)
|
||||||
|
)
|
||||||
|
|
||||||
# Define annotation label functions
|
# Define annotation label functions
|
||||||
generate_annotation_labels <- function(df, var, annotation_name) {
|
generate_annotation_labels <- function(df, var, annotation_name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user