insightsengineering / insightsengineering/random.cdisc.data

[Bug]: Error when I try to use radlb

Open
#325 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
R
Stars
45
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### What happened?

When I change the defaulted values for paramcd in radlb() I get this error message:

`Error in `dplyr::mutate()`:
ℹ In argument: `LOQFL = factor(...)`.
ℹ In row 11.
Caused by error in `parse()`:
! :1:18: unexpected numeric constant
1: 3.07364534531585 NA
^`

Here is the code I am using:

`a <- radsl(N = 1, study_duration = 2, with_trt02 = F)

radlb(adsl = a,
lbcat = c("URINE", "URINE", "URINE"),
param = c("Param1", "Param2",
"Param3"),
paramcd = c("ALT", "CRP", "TEST"),
paramu = c('mg/L','mg/L', 'mg/L'),
aval_mean = c(18, 9, 2.9),
n_assessments = 3L,
n_days = 7L, visit_format = 'WEEK')`

### sessionInfo()

```R
R version 4.3.1 (2023-06-16)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: OpenShift Enterprise

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Europe/Prague
tzcode source: system (glibc)

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] random.cdisc.data_0.3.15

loaded via a namespace (and not attached):
[1] vctrs_0.6.5 cli_3.6.2 rlang_1.1.4 stringi_1.8.4 generics_0.1.3 glue_1.7.0 colorspace_2.1-0
[8] backports_1.5.0 scales_1.3.0 fansi_1.0.6 grid_4.3.1 munsell_0.5.1 tibble_3.2.1 yaml_2.3.8
[15] lifecycle_1.0.4 stringr_1.5.1 compiler_4.3.1 dplyr_1.1.4 timechange_0.3.0 pkgconfig_2.0.3 rstudioapi_0.16.0
[22] R6_2.5.1 tidyselect_1.2.1 utf8_1.2.4 pillar_1.9.0 magrittr_2.0.3 checkmate_2.3.1 withr_3.0.0
[29] tools_4.3.1 gtable_0.3.5 lubridate_1.9.3 ggplot2_3.5.1
```

### 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.