You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The regression and survival partial-dependence surfaces were interactive
plotly widgets; self-contained quarto inlined plotly.js (~3.5 MB) into
each vignette HTML, and figures rendered at retina 2x. Installed size was
17.1 MB (doc 16.3 MB), well over CRAN's 5 MB guideline.
Replace both surfaces with static ggplot2 heat maps, set fig-format png /
fig-dpi 96 in all four vignettes, and drop the now-unused plotly Suggests.
Installed size drops to ~5.5 MB (doc 4.7 MB); source tarball 9.0 -> 3.7 MB.
R CMD check --as-cran (with manual, ggraph present): pending confirmation.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
```{rplotly-surface, error=TRUE, fig.cap="Interactive partial dependence surface: survival as a function of bilirubin and albumin."}
569
+
```{rpd-surface, error=TRUE, fig.height=5, fig.cap="Partial dependence surface: survival at 1 year as a function of bilirubin and albumin. Fill colour is the predicted survival probability."}
568
570
if (!exists("surface_df")) {
569
-
message("surface_df not available — skipping plotly surface (see surface-data chunk error above).")
570
-
} else if (requireNamespace("plotly", quietly = TRUE)) {
571
-
# Reshape for surface
572
-
library(plotly)
573
-
574
-
surface_wide <- surface_df |>
575
-
select(bili = x, albumin, survival = yhat) |>
576
-
arrange(albumin, bili)
577
-
578
-
# Create matrix form
579
-
bili_vals <- sort(unique(surface_wide$bili))
580
-
alb_vals <- sort(unique(surface_wide$albumin))
581
-
z_matrix <- matrix(surface_wide$survival,
582
-
nrow = length(alb_vals),
583
-
ncol = length(bili_vals),
584
-
byrow = TRUE)
585
-
586
-
plot_ly(x = bili_vals, y = alb_vals, z = z_matrix) |>
0 commit comments