Skip to content

Packages on OpenCPU

Ruben C. Arslan edited this page May 24, 2019 · 13 revisions

To get an up-to-date list of packages on OpenCPU, look at http://opencpu2.psych.bio.uni-goettingen.de/ocpu/library/

Currently, a way to set up packages might be to run:

install.packages(c("abind", "acepack", "AER", "AICcmodavg", "akima", "alr4", "Amelia", 
"ape", "aplpack", "arm", "ascii", "ash", "backports", "BatchExperiments", 
"BatchJobs", "BayesFactor", "bayesplot", "BB", "BBmisc", "bbmle", 
"bdsmatrix", "BH", "BiasedUrn", "bindr", "bindrcpp", "bit", "bit64", 
"bitops", "blme", "blob", "bridgesampling", "brms", "Brobdingnag", 
"broom", "Cairo", "callr", "car", "carData", "caTools", "cellranger", 
"checkmate", "chron", "CircStats", "cmprsk", "coda", "codebook", 
"coin", "colorspace", "colourpicker", "combinat", "commonmark", 
"CompQuadForm", "corpcor", "coxme", "crosstalk", "cubature", 
"d3Network", "data.table", "DBI", "dbplyr", "deldir", "desc", 
"descr", "dfoptim", "DiagrammeR", "dichromat", "doParallel", 
"dotCall64", "downloader", "dplyr", "DT", "dtplyr", "dygraphs", 
"eaf", "editR", "effects", "ellipse", "emdbook", "emmeans", "emoa", 
"Epi", "estimability", "etm", "expm", "extrafont", "extrafontdb", 
"fail", "fdrtool", "fields", "fmsb", "FNN", "foreach", "formatR", 
"Formula", "futile.logger", "futile.options", "future", 
"gamm4", "gdata", "gdtools", "gee", "geepack", "genetics", "geosphere", 
"GGally", "ggalt", "ggeffects", "ggforce", "ggfortify", "ggiraph", 
"ggmap", "ggplot2", "ggraph", "ggrepel", "ggthemes", "ggvis", 
"gistr", "glasso", "glmmTMB", "globals", "gmailr", "gof", "googlesheets", 
"googleVis", "gplots", "gridBase", "gridExtra", "gridSVG", "gstat", 
"gtable", "gtools", "hexbin", "hflights", "highcharter", "Hmisc", 
"HSAUR3", "htmlTable", "htmltools", "htmlwidgets", "hunspell", 
"igraph", "igraphdata", "influenceR", "inline", "intervals", 
"irace", "irlba", "irr", "iterators", "jpeg", "kinship2", "knitrBootstrap", 
"koRpus", "labeling", "Lahman", "lambda.r", "latticeExtra", "lava", 
"lavaan", "lavaan.survey", "lazyeval", "leaflet", "leaps", "lhs", 
"likert", "lintr", "lisrelToR", "listenv", "lme4", "lmerTest", 
"lmtest", "logspline", "loo", "lpSolve", "lsmeans", "lubridate", 
"mapproj", "maps", "maptools", "markdownapp", "MasterBayes", 
"Matching", "MatchIt", "matrixcalc", "MatrixModels", "matrixStats", 
"maxLik", "mcmc", "MCMCglmm", "MCMCpack", "memisc", "merTools", 
"meta", "MetABEL", "metacom", "metafor", "metagen", "metaLik", 
"metap", "MetaPCA", "MetaQC", "MetaSKAT", "metatest", "Metatron", 
"metricsgraphics", "mets", "mgcv", "mi", "mice", "miniUI", "minqa", 
"miscTools", "mnormt", "modelr", "modeltools", "mpt", "MTurkR", 
"multcomp", "MuMIn", "munsell", "mvtnorm", "network", "nleqslv", 
"nloptr", "NMF", "nor1mix", "numDeriv", "officer", "optextras", 
"optimx", "orthopolynom", "packrat", "ParamHelpers", "pbapply", 
"pbivnorm", "pbkrtest", "pedigreemm", "permute", "pkgKitten", 
"pkgmaker", "PKI", "plogr", "plotly", "plotROC", "plyr", "png", 
"polspline", "polynom", "praise", "prediction", "prettyunits", 
"prodlim", "progress", "proj4", "proto", "pryr", "psych", "purrr", 
"pwr", "qrencoder", "quadprog", "quantmod", "QuantPsyc", "quantreg", 
"randomForest", "RAppArmor", "raster", "rasterVis", "rbokeh", 
"R.cache", "Rcgmin", "rCharts", "RColorBrewer", "RcppArmadillo", 
"RcppEigen", "RCurl", "readxl", "registry", "rematch", "repr", 
"reprex", "reshape", "reshape2", "rex", "rgexf", "rgl", "rglwidget", 
"RgoogleMaps", "rjson", "RJSONIO", "rlist", "rmarkdown", "rmeta", 
"R.methodsS3", "rms", "rngtools", "rockchalk", "R.oo", "Rook", 
"roxygen2", "rprojroot", "R.rsp", "rsconnect", "RSQLite", "rstan", 
"rstanarm", "rstantools", "Rttf2pt1", "RUnit", "R.utils", "rversions", 
"rvest", "rvg", "Rvmmin", "RWiener", "sandwich", "scales", "scatterplot3d", 
"selectr", "sem", "semTools", "setRNG", "shiny", "shinyAce", 
"shinyBS", "shinyFiles", "shinyjs", "shinystan", "shinythemes", 
"simsem", "sjlabelled", "sjmisc", "sjPlot", "sjstats", "SKAT", 
"skimr", "SMVar", "sna", "snakecase", "sodium", "sourcetools", 
"sp", "spacetime", "spam", "SparseM", "SQUAREM", "StanHeaders", 
"statmod", "statnet.common", "stringdist", "strucchange", "survey", 
"survival", "svglite", "svUnit", "tables", "tensorA", "testthat", 
"TH.data", "threejs", "tidyselect", "tidyverse", "timereg", "TMB", 
"tripack", "tseries", "TTR", "tufte", "tutorial", "tweenr", "twitteR", 
"ucminf", "udunits2", "units", "unmarked", "urlshorteneR", "uuid", 
"vcd", "vegan", "VGAM", "viridis", "viridisLite", "visNetwork", 
"waffle", "wesanderson", "xfun", "XML", "xml2", "xtable", "xts", 
"Zelig", "zipcode", "zoo", "bitops", "DBI", "RCurl", "RMySQL", 
"XML", "assertthat", "base", "base64enc", "boot", "brew", "class", 
"cli", "cluster", "codetools", "compiler", "crayon", "curl", 
"datasets", "devtools", "digest", "evaluate", "feather", "forcats", 
"foreign", "git2r", "glue", "graphics", "grDevices", "grid", 
"haven", "highr", "hms", "httpuv", "httr", "jsonlite", "KernSmooth", 
"knitr", "lattice", "magrittr", "markdown", "MASS", "Matrix", 
"memoise", "methods", "mgcv", "mime", "nlme", "nnet", "opencpu", 
"openssl", "pander", "parallel", "pillar", "pkgconfig", "protolite", 
"R6", "rappdirs", "Rcpp", "readr", "rlang", "rpart", "rstudioapi", 
"sendmailR", "spatial", "splines", "stats", "stats4", "stringi", 
"stringr", "survival", "sys", "tcltk", "tibble", "tools", "unix", 
"utf8", "utils", "webutils", "whisker", "withr", "yaml", "zip"
))
devtools::install_github("rubenarslan/formr")

There is a bug in OpenCPU where we can get an "unloading error" when updating packages that are part of the core OpenCPU set. Therefore, we should always run the following to remove dupes.

An old package could hide in any library

.libPaths(c( "/usr/local/lib/opencpu/site-library", 
						 "/usr/local/lib/R/site-library",
						 "/usr/lib/R/site-library",
						 "/usr/lib/R/library",   
						"/usr/lib/opencpu/library"  ))

Get a list of duplicated packages

library(tidyverse)
pkgs <- installed.packages()
pkgs <- as.data.frame(pkgs)

dupes <- pkgs %>% select(Package, Version, LibPath) %>% 
	group_by(Package) %>% 
	filter(n_distinct(Version, na.rm = TRUE) > 1) 

Check which version is installed in which library

dupes %>% 
	spread(LibPath, Version) %>% 
	knitr::kable()

Remove any duplicates which older versions

dupes %>% 
	group_by(Package) %>% 
	arrange(desc(Version)) %>% 
	filter(Version != first(Version)) %>% 
	purrr::pmap(~ remove.packages(..1, ..3))