insightsengineering / insightsengineering/teal.goshawk

[Bug]: `tm_g_gh_correlationplot` `intercept = slope` issue - missing TRUE/FA:SE

Open
#356 1 comment 0 reactions 0 assignees View on GitHub
bug core
Dominant language
R
Stars
3
Forks
3
Avg merge
2d 6h
Merged PRs (30d)
11

Description

### What happened?

Similar to https://github.com/insightsengineering/teal.goshawk/issues/347

Go to https://genentech.shinyapps.io/nest_longitudinal_dev/
Visualizations -> Correlation Plot ->
Select Treatment variable: Race
Check: Regression Line

```r
ℹ In argument: `intercept = slope(AVAL_ALT, BASE_ALT)[1]`.
ℹ In group 25: `RACE = MULTIPLE` `AVISITCD = BL`.
Caused by error in `if (stats::sd(y) != 0) ...`:
! missing value where TRUE/FALSE needed
when evaluating qenv code:
p <- goshawk::g_correlationplot(data = ANL_TRANSPOSED, param_var = "PARAMCD", xaxis_param = "ALT", xaxis_var = "BASE", xvar = "BASE_ALT", yaxis_param = "ALT", yaxis_var = "AVAL", yvar = "AVAL_ALT", trt_group = "RACE", xlim = c(min = 0, max = 55), ylim = c(min = 0, max = 55), title_text = "Alanine Aminotransferase Measurement (U/L) and Alanine Aminotransferase Measurement (U/L) @ Visits", xaxis_lab = "Alanine Aminotransferase Measurement (U/L) BASE Values", yaxis_lab = "Alanine Aminotransferase Measurement (U/L) AVAL Values",
color_manual = c(`Drug X 100mg` = "#1e90ff", `Combination 100mg` = "#bb9990", Placebo = "#ffa07a"), shape_manual = c(N = 1, Y = 2, `NA` = 0), facet_ncol = 2L, visit_facet = TRUE, facet = FALSE, facet_var = "RACE", reg_line = TRUE, font_size = 12L, dot_size = 1L, reg_text_size = 3L, loq_legend = TRUE, rotate_xlab = TRUE, hline_arb = c(10, 30), hline_arb_label = "arb hori label", hline_arb_color = c("red", "blue"), hline_vars = NULL, hline_vars_colors = character(0), hline_vars_labels = " - ALT",
vline_arb = c(50, 70), vline_arb_label = "arb vert A", vline_arb_color = c("green", "orange"), vline_vars = NULL, vline_vars_colors = character(0), vline_vars_labels = " - ALT")
```

Image

Image

### sessionInfo()

```R

```

### Relevant log output

```R

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct.

### Contribution Guidelines

- [x] I agree to follow this project's Contribution Guidelines.

### Security Policy

- [x] I agree to follow this project's Security Policy.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.