Skip to content

Instantly share code, notes, and snippets.

@HughParsonage
Created April 22, 2018 12:00
Show Gist options
  • Save HughParsonage/35426aa9a391af0611c885f5872be29b to your computer and use it in GitHub Desktop.
Save HughParsonage/35426aa9a391af0611c885f5872be29b to your computer and use it in GitHub Desktop.
Test post devtools::revdep()
# bad_names <- names(checksMini)
bad_names <- c("AF", "AFM", "aLFQ", "annovarR", "antaresProcessing", "BatchExperiments",
"BatchJobs", "BGData", "biomartr", "brainGraph", "bupaR", "BuyseTest",
"Causata", "cdparcoord", "cffdrs", "classifierplots", "clickstream",
"corpustools", "corregp", "ctmm", "cvAUC", "dartR", "dat", "dataPreparation",
"DCD", "dfmeta", "dgo", "DGVM3D", "Diderot", "difconet", "drgee",
"dynamichazard", "easycsv", "eclust", "edgeRun", "EdSurvey",
"eeptools", "eiCompare", "EthSEQ", "EurosarcBayes", "EventStudy",
"expss", "fdq", "FedData", "Fgmutils", "flippant", "fst", "genBart",
"GenomicTools", "GGIR", "ggswissmaps", "greport", "hisse", "Hmisc",
"hoardeR", "hypervolume", "iml", "installr", "inTrees", "ITGM",
"itsadug", "JWileymisc", "kangar00", "KRIG", "LabourMarketAreas",
"lava", "lavaSearch2", "LSPFP", "MetamapsDB", "metaMix", "mlr",
"mlrMBO", "MODIStsp", "MultiABEL", "NetLogoR", "networkR", "nlmixr",
"NNS", "openEBGM", "OpenML", "openSTARS", "optiSel", "orgR",
"padr", "partialCI", "partools", "pcrsim", "petro.One", "PhenotypeSimulator",
"pkggraph", "plotly", "popEpi", "PopGenReport", "prioritizr",
"ProFound", "Publish", "quickPlot", "RAM", "rangeMapper", "RAPIDR",
"Rblpapi", "readtext", "RecordLinkage", "REIDS", "reinsureR",
"rGoodData", "riskRegression", "RndTexExams", "Rnets", "RNewsflow",
"robCompositions", "RSauceLabs", "rstanarm", "rtop", "SafeQuant",
"sdcMicro", "sdcTable", "SDLfilter", "seleniumPipes", "sentometrics",
"simPop", "SIRItoGTFS", "sitree", "socialmixr", "sommer", "SpaDES.core",
"sparseFLMM", "speaq", "splitstackshape", "strataG", "strvalidator",
"surveyplanning", "SWMPr", "synthACS", "tcR", "teachingApps",
"textTinyR", "trelliscope", "tRophicPosition", "tstools", "validateRS",
"vardpoor", "VIM", "wally", "winRatioAnalysis", "word.alignment",
"xgboost", "yCrypticRNAs")
availables <- available.packages()
cran_bads <- bad_names[bad_names %in% rownames(availables)]
cran_oks <- c("AF", "AFM", "aLFQ")
cran_skips <- c("annovarR", "dynamichazard")
cran_bads <- cran_bads[cran_bads %notin% c(cran_skips, cran_oks)]
for (pkg in cran_bads) {
pkg_dir <- file.path("revdep", pkg)
if (!dir.exists(pkg_dir) && !requireNamespace(pkg, quietly = TRUE)) {
cat(pkg)
cat("\n")
install.packages(pkg, INSTALL_opts = "--install-tests", quiet = TRUE, lib = .libPaths()[1])
dir.create(file.path("revdep", pkg))
if (tools::testInstalledPackage(pkg, types = "tests", outDir = file.path("revdep", pkg))) {
stop(pkg)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment