可复现的代码
# 获取 R 包元数据
Sys.setenv(R_CRAN_WEB = "https://mirrors.tuna.tsinghua.edu.cn/CRAN")
# 返回 data.frame
pdb <- tools::CRAN_package_db()
maintainer_db <- subset(
x = pdb,
subset = !duplicated(Package) & Maintainer != "ORPHANED",
select = c("Package", "Maintainer")
) |>
transform(Maintainer = gsub(pattern = "<.*?>", replacement = "", x = Maintainer)) |>
transform(Maintainer = trimws(Maintainer, which = "both", whitespace = "[ \t\r\n]")) |>
transform(Maintainer = tolower(Maintainer))
length(unique(maintainer_db$Maintainer))
而根据 Python 官方网站数字 https://pypi.org/,Python 社区开发者超过 55 万人。