evanverse is a utility toolkit that combines package
management, data helpers, plotting tools, statistical workflows, and
convenient operators.
| Area | Examples |
|---|---|
| Operators | %p%, %nin%, %match%,
%map%, %is% |
| Package management | set_mirror(), inst_pkg(),
check_pkg(), update_pkg() |
| Data and parsing | df2list(), df2vect(),
gmt2df(), gmt2list() |
| Statistics | quick_ttest(), quick_anova(),
quick_chisq(), quick_cor() |
| Plotting | plot_bar(), plot_density(),
plot_pie(), plot_venn(),
plot_forest() |
Note: All code examples are static (
eval = FALSE). If you copy-paste everything at once and your fan starts roaring, congratulations: your laptop has entered “research mode”.
Try a few operators first:
"Good" %p% "morning"
#> [1] "Good morning"
c("A", "B", "C") %nin% c("B", "D")
#> [1] TRUE FALSE TRUE
c("tp53", "egfr") %match% c("TP53", "MYC", "EGFR")
#> [1] 1 3Use built-in package-management helpers:
set_mirror("all", "tuna")
inst_pkg("dplyr", source = "CRAN")
check_pkg(c("dplyr", "ggplot2"), source = "CRAN")
#> # A tibble with installed statusUpdate packages when needed:
df2list() and df2vect()set.seed(42)
df <- data.frame(
group = rep(c("A", "B"), each = 30),
value = c(rnorm(30, 5), rnorm(30, 6))
)
res_t <- quick_ttest(df, group_col = "group", value_col = "value")
print(res_t)
#> t.test | p = ...Correlation summary:
plot_bar(
data = data.frame(category = c("A", "B", "C"), value = c(10, 7, 12)),
x_col = "category",
y_col = "value"
)
#> # A ggplot object# 1) Prepare toy reference and gene sets
ref <- toy_gene_ref("human", n = 100)
path <- toy_gmt(n = 3)
# 2) Parse GMT and convert gene IDs
long <- gmt2df(path)
idm <- gene2entrez(long$gene, ref = ref, species = "human")
long$entrez_id <- idm$entrez_id
# 3) Build list per term
long2 <- long[!is.na(long$entrez_id), ]
sets <- df2list(long2, group_col = "term", value_col = "entrez_id")
# 4) Quick statistical and plotting step
res <- quick_cor(mtcars[, c("mpg", "hp", "wt", "qsec")])
plot(res, type = "upper", show_sig = TRUE)?"%p%", ?"%nin%", ?"%match%",
?"%map%", ?"%is%"?set_mirror, ?inst_pkg,
?check_pkg, ?update_pkg?quick_ttest, ?quick_anova,
?quick_chisq, ?quick_cor