diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 0c551839..f13105a1 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -56,7 +56,7 @@ jobs: shell: Rscript {0} - name: Cache R packages - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ${{ env.R_LIBS_USER }} key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }} diff --git a/R/misc_theme_drwhy.R b/R/misc_theme_drwhy.R index f19c608d..6465a121 100644 --- a/R/misc_theme_drwhy.R +++ b/R/misc_theme_drwhy.R @@ -18,8 +18,8 @@ theme_drwhy <- function() { plot.subtitle = element_text(color = "#371ea3", hjust = 0), axis.text = element_text(color = "#371ea3", size = 10), strip.text = element_text(color = "#371ea3", size = 12, hjust = 0), - panel.grid.major.y = element_line(color = "grey90", size = 0.5, linetype = 1), - panel.grid.minor.y = element_line(color = "grey90", size = 0.5, linetype = 1), + panel.grid.major.y = element_line(color = "grey90", linewidth = 0.5, linetype = 1), + panel.grid.minor.y = element_line(color = "grey90", linewidth = 0.5, linetype = 1), panel.grid.minor.x = element_blank(), panel.grid.major.x = element_blank()) @@ -58,8 +58,8 @@ theme_drwhy_vertical <- function() { axis.title = element_text(color = "#371ea3"), axis.text = element_text(color = "#371ea3", size = 10), strip.text = element_text(color = "#371ea3", size = 12, hjust = 0), - panel.grid.major.x = element_line(color = "grey90", size = 0.5, linetype = 1), - panel.grid.minor.x = element_line(color = "grey90", size = 0.5, linetype = 1), + panel.grid.major.x = element_line(color = "grey90", linewidth = 0.5, linetype = 1), + panel.grid.minor.x = element_line(color = "grey90", linewidth = 0.5, linetype = 1), panel.grid.minor.y = element_blank(), panel.grid.major.y = element_blank()) } diff --git a/R/plot_model_diagnostics.R b/R/plot_model_diagnostics.R index b9e8d01f..587277a2 100644 --- a/R/plot_model_diagnostics.R +++ b/R/plot_model_diagnostics.R @@ -48,7 +48,7 @@ plot.model_diagnostics <- function(x, ..., variable = "y_hat", yvariable = "resi # add hline if (yvariable == "residuals") - pl <- pl + geom_hline(yintercept = 0, color = "grey", lty = 2, size = 1) + pl <- pl + geom_hline(yintercept = 0, color = "grey", lty = 2, linewidth = 1) pl + ggtitle("Model diagnostics", paste0(variable, " against ", yvariable)) }