Optional Ecosystem Survey
Dependency Budget
Count Optional Additions
A dependency budget keeps optional package adoption small and reviewable.
Program
Play the script to change the number of optional packages under consideration.
dependency_budget.R
Replay: real traced execution (multi-file project)
optional_count <- 2
base_tools <- c("base", "stats")
optional_tools <- c("readr", "ggplot2", "shiny", "targets")
chosen <- head(optional_tools, optional_count)
total <- length(base_tools) + length(chosen)
label <- paste("tools", total, sep = ":")
cat(label, "\n", sep = "")
optional_count <- 1
base_tools <- c("base", "stats")
optional_tools <- c("readr", "ggplot2", "shiny", "targets")
chosen <- head(optional_tools, optional_count)
total <- length(base_tools) + length(chosen)
label <- paste("tools", total, sep = ":")
cat(label, "\n", sep = "")
optional_count <- 4
base_tools <- c("base", "stats")
optional_tools <- c("readr", "ggplot2", "shiny", "targets")
chosen <- head(optional_tools, optional_count)
total <- length(base_tools) + length(chosen)
label <- paste("tools", total, sep = ":")
cat(label, "\n", sep = "")
optional_count ← 2
1optional_count <- 22base_tools <- c("base", "stats")values this step2optional_countbase_tools ← base, stats
1optional_count <- 22base_tools <- c("base", "stats")3optional_tools <- c("readr", "ggplot2", "shiny", "targets")values this stepbase, statsbase_toolsoptional_tools ← readr, ggplot2, shiny, targets
2base_tools <- c("base", "stats")3optional_tools <- c("readr", "ggplot2", "shiny", "targets")4chosen <- head(optional_tools, optional_count)values this stepreadr, ggplot2, shiny, targetsoptional_toolschosen ← readr, ggplot2
3optional_tools <- c("readr", "ggplot2", "shiny", "targets")4chosen <- head(optional_tools, optional_count)5total <- length(base_tools) + length(chosen)values this stepreadr, ggplot2chosenreadr, ggplot2, shiny, targetsoptional_tools2optional_counttotal ← 4
4chosen <- head(optional_tools, optional_count)5total <- length(base_tools) + length(chosen)6label <- paste("tools", total, sep = ":")values this step4totalbase, statsbase_toolsreadr, ggplot2chosenlabel ← tools:4
5total <- length(base_tools) + length(chosen)6label <- paste("tools", total, sep = ":")7cat(label, "\n", sep = "")values this steptools:4label4totalcat(label, " ", sep = "")
6label <- paste("tools", total, sep = ":")7cat(label, "\n", sep = "")outputtools:4values this steptools:4label
optional_count ← 1
1optional_count <- 12base_tools <- c("base", "stats")values this step1optional_countbase_tools ← base, stats
1optional_count <- 12base_tools <- c("base", "stats")3optional_tools <- c("readr", "ggplot2", "shiny", "targets")values this stepbase, statsbase_toolsoptional_tools ← readr, ggplot2, shiny, targets
2base_tools <- c("base", "stats")3optional_tools <- c("readr", "ggplot2", "shiny", "targets")4chosen <- head(optional_tools, optional_count)values this stepreadr, ggplot2, shiny, targetsoptional_toolschosen ← readr
3optional_tools <- c("readr", "ggplot2", "shiny", "targets")4chosen <- head(optional_tools, optional_count)5total <- length(base_tools) + length(chosen)values this stepreadrchosenreadr, ggplot2, shiny, targetsoptional_tools1optional_counttotal ← 3
4chosen <- head(optional_tools, optional_count)5total <- length(base_tools) + length(chosen)6label <- paste("tools", total, sep = ":")values this step3totalbase, statsbase_toolsreadrchosenlabel ← tools:3
5total <- length(base_tools) + length(chosen)6label <- paste("tools", total, sep = ":")7cat(label, "\n", sep = "")values this steptools:3label3totalcat(label, " ", sep = "")
6label <- paste("tools", total, sep = ":")7cat(label, "\n", sep = "")outputtools:3values this steptools:3label
optional_count ← 4
1optional_count <- 42base_tools <- c("base", "stats")values this step4optional_countbase_tools ← base, stats
1optional_count <- 42base_tools <- c("base", "stats")3optional_tools <- c("readr", "ggplot2", "shiny", "targets")values this stepbase, statsbase_toolsoptional_tools ← readr, ggplot2, shiny, targets
2base_tools <- c("base", "stats")3optional_tools <- c("readr", "ggplot2", "shiny", "targets")4chosen <- head(optional_tools, optional_count)values this stepreadr, ggplot2, shiny, targetsoptional_toolschosen ← readr, ggplot2, shiny, targets
3optional_tools <- c("readr", "ggplot2", "shiny", "targets")4chosen <- head(optional_tools, optional_count)5total <- length(base_tools) + length(chosen)values this stepreadr, ggplot2, shiny, targetschosenreadr, ggplot2, shiny, targetsoptional_tools4optional_counttotal ← 6
4chosen <- head(optional_tools, optional_count)5total <- length(base_tools) + length(chosen)6label <- paste("tools", total, sep = ":")values this step6totalbase, statsbase_toolsreadr, ggplot2, shiny, targetschosenlabel ← tools:6
5total <- length(base_tools) + length(chosen)6label <- paste("tools", total, sep = ":")7cat(label, "\n", sep = "")values this steptools:6label6totalcat(label, " ", sep = "")
6label <- paste("tools", total, sep = ":")7cat(label, "\n", sep = "")outputtools:6values this steptools:6label
budget
`optional_count` limits how many optional dependencies are being considered.
base tools
Built-in tools are tracked separately from optional package labels.
review count
The total count gives reviewers a quick size check.