What happened?
For insightsengineering/teal.modules.clinical#1437 I found that some expressions are missed on teal:
data <- within(teal_data(), {
ADSL <- teal.modules.clinical::tmc_ex_adsl
ADSL$SEX[sample(seq_len(nrow(ADSL)), 50)] <- NA
})
app <- init(
data = data,
modules = example_module()
)
if (interactive()) {
shinyApp(app$ui, app$server)
}
The last line is missing from the app:
But it is present on the qenv.
data |> get_code() |> cat()
# ADSL <- teal.modules.clinical::tmc_ex_adsl
# ADSL$SEX[sample(seq_len(nrow(ADSL)), 50)] <- NA
A more minimal reprex is below:
data <- within(teal.code::qenv(), {
iris <- iris
iris$Species[sample(seq_len(nrow(iris)), 50)] <- NA
})
teal.code::get_code(data, names = "iris") |> cat()
#> iris <- iris
See diagnostics on comments below but it seems $<- and [<- is not picked by get_code
sessionInfo()
Relevant log output
Code of Conduct
Contribution Guidelines
Security Policy
What happened?
For insightsengineering/teal.modules.clinical#1437 I found that some expressions are missed on teal:
The last line is missing from the app:
But it is present on the qenv.
A more minimal reprex is below:
See diagnostics on comments below but it seems
$<-and[<-is not picked byget_codesessionInfo()
Relevant log output
Code of Conduct
Contribution Guidelines
Security Policy