Skip to content

[Bug]: Consistent argument names and defaults #923

@gogonzo

Description

@gogonzo
  • Limit number of unique formals names. tmc modules have 158 unique argument names, some of them might be unified
  • Make a consistent default values wherever possible
  • Make one documentation template for shared arguments (Some shared arguments are documented multiple times)

Please check the table

pkgload::load_all("teal.modules.clinical")
ns <- getNamespace("teal.modules.clinical")
mods <- ls(ns) |>  grep(pattern = "tm_", value = TRUE)
mod_formals <- lapply(mods, function(x) {
  as.data.frame(lapply(formals(x), deparse1))
})


temp <- dplyr::bind_rows(mod_formals)
rownames(temp) <- mods
data <- as.data.frame(t(temp))
data <- dplyr::arrange(data, rownames(data))

data$consistent <- as.vector(
  apply(data, 1, function(x) length(na.omit(unique(x))) <= 1)
)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoresme

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions