Overview
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(), pkg_functions()
|
| 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”.
1 First 30 Seconds
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 32 Mirror & Package Management
Configure mirrors with set_mirror(), then use pak for installation:
# Set CRAN + Bioconductor mirrors (great for users in China)
set_mirror("all", "tuna")
# pak handles CRAN, GitHub, and Bioconductor with a unified interface
pak::pkg_install("dplyr")
pak::pkg_install("tidyverse/ggplot2") # GitHub
pak::pkg_install("bioc::DESeq2") # Bioconductor
# Check status or update
pak::pkg_status(c("dplyr", "ggplot2"))
pak::pkg_update()4 Quick Statistics
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:
5 First Plot
plot_bar(
data = data.frame(category = c("A", "B", "C"), value = c(10, 7, 12)),
x_col = "category",
y_col = "value"
)
#> # A ggplot object6 A Combined Workflow
# 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)