├── Dockerfile ├── LICENSE ├── README.md ├── clean-layer.sh ├── cloudbuild.yaml ├── package_installs.R ├── packages ├── packages.cloudbuild.yaml ├── packages_users ├── rustup.sh ├── test_build.R └── utils.R /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM rocker/tidyverse:4.5.0 2 | 3 | RUN apt-get update && \ 4 | apt-get install -y build-essential clang imagemagick libmagick++-dev libudunits2-dev curl libgdal-dev \ 5 | libjpeg-dev libxt-dev libprotobuf-dev protobuf-compiler libjq-dev libzmq3-dev \ 6 | libv8-dev libnode-dev 7 | 8 | # Install Rust and Cargo. Some R packages requires Rust. 9 | # See: b/113106905 10 | # Script is pulled from https://sh.rustup.rs and mirrored locally for security reasons. 11 | # See: b/238367731 12 | ADD rustup.sh rustup.sh 13 | RUN cat rustup.sh | sh -s -- -y 14 | 15 | ADD clean-layer.sh /tmp/clean-layer.sh 16 | 17 | RUN apt-get update && \ 18 | apt-get install apt-transport-https && \ 19 | apt-get install -y -f libv8-dev libfftw3-dev libgeos-dev libgdal-dev libproj-dev libsndfile1-dev \ 20 | libtiff5-dev libjpeg-dev libhdf4-0-alt libhdf4-alt-dev \ 21 | libhdf5-dev libx11-dev cmake libglu1-mesa-dev libgtk2.0-dev librsvg2-dev libxt-dev \ 22 | patch libgit2-dev && \ 23 | /tmp/clean-layer.sh 24 | 25 | # For package `imager` 26 | RUN apt-get install -y libtiff-dev libxml2-dev libicu-dev libgmp-dev libpng-dev libglpk-dev && \ 27 | /tmp/clean-layer.sh 28 | 29 | # TODO(b/324184434): necessary for mxnet, let's try to remove in the future. 30 | RUN R -e "install.packages('DiagrammeR')" 31 | 32 | RUN apt-get update && apt-get install -y build-essential git ninja-build ccache libatlas-base-dev libopenblas-dev libopencv-dev python3-opencv && \ 33 | cd /usr/local/share && git clone --recursive --depth=1 --branch v1.9.x https://github.com/apache/incubator-mxnet.git mxnet && \ 34 | cd mxnet && cp config/linux.cmake config.cmake && rm -rf build && \ 35 | mkdir -p build && cd build && cmake .. && cmake --build . --parallel $(nproc) && \ 36 | cd .. && make -f R-package/Makefile rpkg && \ 37 | /tmp/clean-layer.sh 38 | 39 | # Needed for "h5" library 40 | RUN apt-get install -y libhdf5-dev && \ 41 | # Needed for "topicmodels" library 42 | apt-get install -y libgsl-dev && \ 43 | # Needed for "tesseract" library 44 | apt-get install -y libpoppler-cpp-dev libtesseract-dev tesseract-ocr-eng && \ 45 | /tmp/clean-layer.sh 46 | 47 | ADD packages packages 48 | ADD packages_users packages_users 49 | ADD package_installs.R /tmp/package_installs.R 50 | ADD utils.R /tmp/utils.R 51 | 52 | RUN Rscript /tmp/package_installs.R && \ 53 | bash -c "rm -Rf /tmp/Rtmp*" 54 | 55 | # Used in the `rstats` Jenkins `Docker GPU Build` step to restrict the images being pruned. 56 | LABEL kaggle-lang=r -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docker-rcran 2 | A dockerfile to install a list of packages from CRAN. 3 | 4 | ## Packages 5 | 6 | The packages list is found in the `packages` and `packages_user` files. 7 | 8 | The first one includes packages that should always be installed, and the second one packages used on Kaggle in the past 60 days (automatically generated). 9 | 10 | If you want to make sure a package is always available, add it to `packages` and `test_build.R` file. 11 | 12 | 13 | ## Build 14 | 15 | To build this image, use [Google Cloud Build](https://cloud.google.com/cloud-build/): 16 | 17 | ``` 18 | gcloud builds submit --async 19 | ``` 20 | 21 | This build takes ~1 hour. This is why the `--async` option is used. 22 | 23 | ## Images 24 | 25 | The intermediate image (`gcr.io/$PROJECT_ID/rcran-build:$BUILD_ID`) is pushed to GCR before running the test 26 | so that a developer can pull the image in order to debug a test failure. 27 | 28 | The final image (`gcr.io/kaggle-images/rcran`) is pushed at the end of the build. Make sure you have access 29 | to that project otherwise your build may fail. 30 | -------------------------------------------------------------------------------- /clean-layer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This scripts should be called at the end of each RUN command 4 | # in the Dockerfiles. 5 | # 6 | # Each RUN command creates a new layer that is stored separately. 7 | # At the end of each command, we should ensure we clean up downloaded 8 | # archives and source files used to produce binary to reduce the size 9 | # of the layer. 10 | set -e 11 | set -x 12 | 13 | # Delete files that pip caches when installing a package. 14 | rm -rf /root/.cache/pip/* 15 | # Delete old downloaded archive files 16 | apt-get autoremove -y 17 | # Delete downloaded archive files 18 | apt-get clean 19 | # Delete source files used for building binaries 20 | rm -rf /usr/local/src/* -------------------------------------------------------------------------------- /cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | steps: 2 | - id: 'build' 3 | name: 'gcr.io/cloud-builders/docker' 4 | args: 5 | - build 6 | - --rm 7 | - --no-cache 8 | - --tag=us-docker.pkg.dev/$PROJECT_ID/tools/rcran-build:$BUILD_ID 9 | - . 10 | 11 | # Pushing the intermediate image can be useful to debug test failures. 12 | - id: 'intermediate-push' 13 | waitFor: ['build'] 14 | name: 'gcr.io/cloud-builders/docker' 15 | args: 16 | - push 17 | - us-docker.pkg.dev/$PROJECT_ID/tools/rcran-build:$BUILD_ID 18 | 19 | # Verify 'convert' (ImageMagick) is available. 20 | - id: 'test-convert' 21 | waitFor: ['intermediate-push'] # Otherwise the test failure should stop push. 22 | name: 'us-docker.pkg.dev/$PROJECT_ID/tools/rcran-build:$BUILD_ID' 23 | args: ['convert', '--version'] 24 | 25 | - id: 'test' 26 | waitFor: ['intermediate-push'] # Otherwise the test failure should stop push. 27 | name: 'us-docker.pkg.dev/$PROJECT_ID/tools/rcran-build:$BUILD_ID' 28 | entrypoint: 'bash' 29 | args: 30 | - '-c' 31 | - | 32 | set -e 33 | Rscript test_build.R 34 | # Verify expected test_build.R output is present. 35 | [ -s plot1.png ] 36 | echo "ok" 37 | 38 | - id: 'retag' 39 | waitFor: ['test', 'test-convert'] 40 | name: 'gcr.io/cloud-builders/docker' 41 | args: 42 | - tag 43 | - us-docker.pkg.dev/$PROJECT_ID/tools/rcran-build:$BUILD_ID 44 | - gcr.io/kaggle-images/rcran:$_TAG 45 | 46 | images: ['gcr.io/kaggle-images/rcran:$_TAG'] 47 | 48 | options: 49 | # Use of largest GCB instance size in shared pool. 50 | # Upon change, update Ncpus in package_installs.R. 51 | machineType: 'N1_HIGHCPU_32' 52 | diskSizeGb: 1000 # Max disk size. Gives more IOPS. 53 | 54 | timeout: 86400s 55 | 56 | substitutions: 57 | _TAG: testing # Change to latest for production. 58 | 59 | tags: ['rcran', 'notification'] 60 | -------------------------------------------------------------------------------- /package_installs.R: -------------------------------------------------------------------------------- 1 | # Repo to pull package data and metadata from. 2 | REPO <- 'http://cran.us.r-project.org' 3 | options(repos = c("CRAN" = REPO)) 4 | 5 | options(install.packages.compile.from.source = "never") 6 | 7 | # Number of parallel installs. 8 | # Experimentally optimized. A too high value (128) crashes. 9 | M <- 16 10 | 11 | # Make use of all CPUs available. 12 | options(Ncpus = parallel::detectCores()) 13 | 14 | # Install parallel library. 15 | library(parallel) 16 | unlink("install_log_parallel") 17 | 18 | # Install util packages. 19 | utilPackages <- c('Rcpp', 'repr', 'rmutil', 'testthat', 'hrbrthemes') 20 | for (p in utilPackages) { 21 | install.packages(p, verbose=FALSE, quiet=FALSE, repos=REPO) 22 | } 23 | 24 | # Install older version of packages. 25 | library(devtools) 26 | install_version("randomForest", version='4.6.14') # [b/219681100] 27 | install_version("terra", version='1.5-34') # [b/240934971] 28 | install_version("ranger", version='0.14.1') # [b/291120269] 29 | install_version("imager", version='0.42.16') # [b/325867887] 30 | 31 | # All packages available in the repo. 32 | allPackages <- as.data.frame(available.packages(repos=REPO)) 33 | 34 | # Already installed packages. 35 | existingPackages <- installed.packages() 36 | 37 | # Get list of packages to install from files. 38 | library("rmutil") 39 | p <- read.table(file="packages") 40 | pu <- read.table(file="packages_users") 41 | pmerged <- rbind(p, pu) 42 | pkgs <- pmerged[,1] 43 | 44 | M <- min(M, length(pkgs)) 45 | 46 | do_one <- function(pkg, repos){ 47 | h <- function(e) structure(conditionMessage(e), class=c("snow-try-error","try-error")) 48 | # Treat warnings as errors. (An example 'warning' is that the package is not found!) 49 | tryCatch( 50 | install.packages(pkg, verbose=FALSE, quiet=FALSE, repos=repos), 51 | error=h, 52 | warning=h) 53 | } 54 | 55 | alreadyInstalled <- function(pkg){ 56 | if(pkg %in% rownames(existingPackages)){ 57 | if(!is.na(allPackages$Version[pkg]) && existingPackages[pkg,"Version"] == as.character(allPackages$Version[pkg])) { 58 | return(TRUE) 59 | } 60 | } 61 | return(FALSE) 62 | } 63 | vecAlreadyInstalled <- Vectorize(alreadyInstalled) 64 | 65 | source('/tmp/utils.R') 66 | print("Generating dependency list...") 67 | dl <- make_dependency_list(pkgs, allPackages) 68 | dl <- dl[!vecAlreadyInstalled(names(dl))] 69 | dl <- lapply(dl, function(x) x[x %in% names(dl)]) 70 | lens <- sapply(dl, length) 71 | ready <- names(dl[lens == 0L]) 72 | n <- length(ready) 73 | total <- length(dl) 74 | 75 | print(paste("Ready packages: ", n)) 76 | print(paste("Total packages to install: ", total)) 77 | 78 | cl <- makeCluster(M, outfile = "install_log_parallel") 79 | 80 | submit <- function(node, pkg) { 81 | parallel:::sendCall(cl[[node]], do_one, list(pkg, repos=REPO), tag = pkg) 82 | } 83 | 84 | for (i in 1:min(n, M)) { 85 | submit(i, ready[i]) 86 | } 87 | dl <- dl[!names(dl) %in% ready[1:min(n, M)]] 88 | av <- if(n < M) (n+1L):M else integer() # available workers 89 | 90 | success <- character(0) 91 | errors <- character(0) 92 | start <- Sys.time() 93 | while(length(dl) > 0 || length(av) != M) { 94 | if (length(av) == M) { 95 | stop("deadlock") 96 | } 97 | 98 | d <- parallel:::recvOneResult(cl) 99 | 100 | # Handle errors reported by the worker. 101 | if (inherits(d$value, 'try-error')) { 102 | msg <- paste("ERROR: worker", d$node, "for package ", d$tag, ":", d$value) 103 | print(msg) 104 | warning(msg) 105 | errors <- c(errors, d$tag) 106 | } else { 107 | success <- c(success, d$tag) 108 | } 109 | 110 | # Find work to be done. 111 | av <- c(av, d$node) 112 | dl <- lapply(dl, function(x) x[x != d$tag]) 113 | lens <- sapply(dl, length) 114 | ready <- names(dl[lens == 0L]) 115 | m <- min(length(ready), length(av)) # >= 1 116 | 117 | # Report for this iteration. 118 | eta <- start + (Sys.time() - start) / (length(success) + length(errors)) * total 119 | print(paste( 120 | "done:", d$tag, "on", d$node, 121 | ", success:", length(success), 122 | ", failed:", length(errors), 123 | ", remaining:", length(dl), 124 | ", ready:", length(ready), 125 | ", next:", if (m) paste(ready[1:m], "on", av[1:m]) else "", 126 | ", eta:", eta)) 127 | 128 | # Possibly schedule next work. Typically submits exactly 1 task, though occasionally: 129 | # - 0 (when blocked on ongoing installs to complete dependencies first) 130 | # - or >1 (possibly after being unblocked from the previously described condition) 131 | if (m) { 132 | for (i in 1:m) { 133 | submit(av[i], ready[i]) 134 | } 135 | av <- av[-(1:m)] 136 | dl <- dl[!names(dl) %in% ready[1:m]] 137 | } 138 | } 139 | 140 | # Make sure the packages from the file `packages` are properly installed 141 | # otherwise reinstalling in a single thread from a different repo, as they sometimes 142 | # fail in the previous technique. 143 | for (p in p[,1]) { 144 | if (!require(p, character.only = TRUE)) { 145 | install.packages(p, verbose=FALSE, quiet=FALSE, repos='http://cran.rstudio.com') 146 | } 147 | } 148 | 149 | print("Done!") 150 | print(paste("Successfully installed:", success)) 151 | print(paste("Likely failed:", errors)) 152 | print(paste("Elapsed:", Sys.time() - start)) 153 | -------------------------------------------------------------------------------- /packages: -------------------------------------------------------------------------------- 1 | Amelia 2 | animation 3 | BH 4 | bigrquery 5 | bitops 6 | class 7 | colorspace 8 | devtools 9 | DiagrammeR 10 | dichromat 11 | digest 12 | dplyr 13 | dtwclust 14 | fable 15 | foreign 16 | gapminder 17 | gganimate 18 | ggplot2 19 | ggraph 20 | ggthemes 21 | gridSVG 22 | gtable 23 | hrbrthemes 24 | imager 25 | IRkernel 26 | jsonlite 27 | keras 28 | KernSmooth 29 | knitr 30 | labeling 31 | lattice 32 | leaflet 33 | magick 34 | MASS 35 | Matrix 36 | mefa 37 | mgcv 38 | mime 39 | munsell 40 | nnet 41 | oro.dicom 42 | oro.nifti 43 | plyr 44 | prevR 45 | proto 46 | randomForest 47 | ranger 48 | rARPACK 49 | RColorBrewer 50 | Rcpp 51 | RCurl 52 | Rtsne 53 | readr 54 | repr 55 | reshape2 56 | rgdal 57 | rgeos 58 | rmutil 59 | roxygen2 60 | rpart 61 | rstan 62 | scales 63 | seewave 64 | sf 65 | stringr 66 | survival 67 | terra 68 | testthat 69 | tfhub 70 | tidymodels 71 | tidyr 72 | timereg 73 | torch 74 | udunits2 75 | xgboost 76 | zoo -------------------------------------------------------------------------------- /packages.cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # This build fetches R packages used on Kaggle and updates 2 | # the `packages_users` file on GitHub. 3 | 4 | # In order for this build to have write access to the repo, a deploy key 5 | # has been created and added to the repo. 6 | # - doc: https://cloud.google.com/cloud-build/docs/access-private-github-repos 7 | # - deploy key: https://github.com/Kaggle/docker-rcran/settings/keys 8 | 9 | steps: 10 | 11 | # Get the rsa key file from Secret Manager. 12 | - name: gcr.io/cloud-builders/gcloud 13 | entrypoint: 'bash' 14 | args: [ '-c', 'gcloud secrets versions access latest --secret=rcran-id-rsa > /root/.ssh/id_github' ] 15 | volumes: 16 | - name: 'ssh' 17 | path: /root/.ssh 18 | 19 | # Set up git with key and domain. 20 | - name: 'gcr.io/cloud-builders/git' 21 | entrypoint: 'bash' 22 | args: 23 | - '-c' 24 | - | 25 | chmod 600 /root/.ssh/id_github 26 | cat </root/.ssh/config 27 | Hostname github.com 28 | IdentityFile /root/.ssh/id_github 29 | EOF 30 | ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts 31 | git config --global user.email "robot@kaggle.com" 32 | volumes: 33 | - name: 'ssh' 34 | path: /root/.ssh 35 | 36 | # Pull the repository from GitHub. 37 | - name: 'gcr.io/cloud-builders/git' 38 | args: 39 | - clone 40 | - git@github.com:Kaggle/docker-rcran.git 41 | volumes: 42 | - name: 'ssh' 43 | path: /root/.ssh 44 | 45 | # Fetch the packages from BigQuery. 46 | # The `bq` image has been built previously in the project: 47 | # $ git clone https://github.com/GoogleCloudPlatform/cloud-builders-community.git 48 | # $ cd cloud-builders-community/bq 49 | # $ gcloud builds submit 50 | - name: 'gcr.io/$PROJECT_ID/bq' 51 | entrypoint: 'bash' 52 | dir: docker-rcran 53 | args: 54 | - '-c' 55 | - | 56 | set -eo pipefail 57 | bq query \ 58 | --use_legacy_sql=false \ 59 | --format=sparse \ 60 | --max_rows=100000 \ 61 | 'SELECT PackageName FROM `kaggle-infra-analytics.kaggle_derived_no_pii.KernelBlobsRPackagesLast60days` ORDER BY PackageName' \ 62 | > bq_response || (cat bq_response && exit 1) 63 | # Remove leading whitespaces 64 | sed "s/^[ \t]*//" -i bq_response 65 | # Ignore tensorflow which is installed in docker-rstats image. 66 | # Also ignore the headers of the search results. 67 | cat bq_response | grep -v 'tensorflow' | awk 'NR>2' > packages_users 68 | 69 | # Commit the file to GitHub. 70 | - name: 'gcr.io/cloud-builders/git' 71 | entrypoint: 'bash' 72 | dir: docker-rcran 73 | args: 74 | - '-c' 75 | - | 76 | git commit -am "Update the list of R packages used on Kaggle ($(wc -l packages_users | awk '{ print $1 }') packages)" 77 | git push -u origin main 78 | volumes: 79 | - name: 'ssh' 80 | path: /root/.ssh 81 | 82 | tags: ['rcran', 'packages', 'notification'] -------------------------------------------------------------------------------- /packages_users: -------------------------------------------------------------------------------- 1 | 2 | AER 3 | AID 4 | AIF360 5 | ALRA 6 | ALSM 7 | AMR 8 | ANTsR 9 | ARDL 10 | ARTool 11 | ASMap 12 | AUC 13 | AlgDesign 14 | AlphaSimR 15 | AlteryxPredictive 16 | Amelia 17 | AmesHousing 18 | AnnotationDbi 19 | AppliedPredictiveModeling 20 | Azimuth 21 | BAPC 22 | BART 23 | BAS 24 | BASS 25 | BB 26 | BBmisc 27 | BREMSC 28 | BSDA 29 | BTM 30 | BTYDplus 31 | BWStest 32 | BayesBEKK 33 | BetterReg 34 | BioStatR 35 | Biobase 36 | BiocManager 37 | BiocParallel 38 | BiodiversityR 39 | Biostrings 40 | BivRegBLS 41 | Boruta 42 | C50 43 | CAM 44 | CASdatasets 45 | CBPS 46 | CCA 47 | CCP 48 | CFtime 49 | CGPfunctions 50 | CHETAH 51 | CIMLR 52 | CMplot 53 | COSG 54 | COUNT 55 | CVR 56 | CVXR 57 | Cairo 58 | CatEncoders 59 | CausalImpact 60 | ChainLadder 61 | ChannelAttribution 62 | ChemmineR 63 | ClimIndVis 64 | ClustOfVar 65 | ClusterR 66 | CombMSC 67 | ComplexHeatmap 68 | ConfusionTableR 69 | CrowdQCplus 70 | Cubist 71 | DAAG 72 | DAEX 73 | DALEX 74 | DALEXtra 75 | DBI 76 | DESeq2 77 | DEoptim 78 | DHARMa 79 | DIMORA 80 | DMRcate 81 | DMwR 82 | DMwR2 83 | DOSE 84 | DOTA_devkit 85 | DT 86 | DataCombine 87 | DataExplorer 88 | Dataexplorer 89 | Deducer 90 | DescTools 91 | DiagrammeR 92 | DiceOptim 93 | DiscriMiner 94 | DoseFinding 95 | DoubleML 96 | EBImage 97 | EIX 98 | ESKNN 99 | Ecdat 100 | EdSurvey 101 | ElemStatLearn 102 | EnvRtype 103 | EnvStats 104 | Epi 105 | EpiEstim 106 | EpiSmokEr 107 | ExPanDaR 108 | ExcelFunctionsR 109 | ExperimentHub 110 | FDboost 111 | FFTrees 112 | FNN 113 | FSA 114 | FSelector 115 | FSinR 116 | FactoClass 117 | FactoMineR 118 | Factoshiny 119 | FeatureHashing 120 | FeatureImpCluster 121 | FielDHub 122 | FinTS 123 | FinancialInstrument 124 | FitAR 125 | Formula 126 | FunCluster 127 | FuseBox 128 | GA 129 | GAS 130 | GEOquery 131 | GGally 132 | GLDEX 133 | GOSim 134 | GPArotation 135 | GSA 136 | GSEABase 137 | GSVA 138 | GWalkR 139 | GWmodel 140 | GenOrd 141 | GenSA 142 | GeneCycle 143 | GenomicRanges 144 | Glimma 145 | Gmedian 146 | GoodmanKruskal 147 | H2O 148 | HDCytoData 149 | HRW 150 | HSAUR 151 | Hmisc 152 | HoRM 153 | Hotelling 154 | INLA 155 | IRdisplay 156 | ISLR 157 | ISLR2 158 | ISwR 159 | IncDTW 160 | Information 161 | InformationValue 162 | IntNMF 163 | InterSIM 164 | IntroCompFinR 165 | IsolationForest 166 | JM 167 | JMbayes2 168 | Janitor 169 | KMsurv 170 | Kendall 171 | KernSmooth 172 | KernelKnn 173 | KoNLP 174 | LDAvis 175 | Lahman 176 | LiblineaR 177 | LogicReg 178 | MAMSE 179 | MAPA 180 | MASS 181 | MCMCpack 182 | MCS 183 | MESS 184 | MLDataR 185 | MLeval 186 | MLmetrics 187 | MODISTools 188 | MODIStsp 189 | MOFA2 190 | MRPRESSO 191 | MSES 192 | MSR 193 | MTS 194 | MVN 195 | MarketingMixOpt 196 | MatchIt 197 | Matching 198 | Matrix 199 | MeanShift 200 | MetBrewer 201 | Metrics 202 | MlBayesOpt 203 | ModelMetrics 204 | Morpheus 205 | MultivariateAnalysis 206 | NHANES 207 | NLP 208 | NMF 209 | NNS 210 | NbClust 211 | NetworkComparisonTest 212 | NeuralNetTools 213 | NonCompart 214 | NormPsy 215 | OECD 216 | ORCI 217 | OmnipathR 218 | OneR 219 | OpenImageR 220 | OpenMPController 221 | OpenStreetMap 222 | OptimalCutpoints 223 | PACKAGE_NAME 224 | PASWR 225 | PCAmixdata 226 | PEIP 227 | PHInfiniteEstimates 228 | PIL 229 | PMCMRplus 230 | PMwR 231 | PNADcIBGE 232 | POT 233 | PRROC 234 | PReMiuM 235 | PSweight 236 | PairedData 237 | ParBayesianOptimization 238 | ParallelStructure 239 | PerformanceAnalytics 240 | PlayerRatings 241 | Polychrome 242 | PortfolioAnalytics 243 | PostgreSQL 244 | PreProcess 245 | Publish 246 | QRM 247 | Quandl 248 | QuantPsyc 249 | R2OpenBUGS 250 | R6 251 | RAM 252 | RANN 253 | RBBR 254 | RCT 255 | RColorBrewer 256 | RCurl 257 | RDHonest 258 | REdaS 259 | RGCCA 260 | RGraphics 261 | RHadoop 262 | RJSONIO 263 | RMySQL 264 | ROAuth 265 | ROCR 266 | ROCit 267 | RODBC 268 | ROI 269 | ROSE 270 | RPMM 271 | RPostgreSQL 272 | RPostgres 273 | RSKC 274 | RSNNS 275 | RSQL 276 | RSQLite 277 | RSelenium 278 | RSentiment 279 | RSpectra 280 | RTextTools 281 | RTransferEntropy 282 | RVAideMemoire 283 | RWeka 284 | RWekajars 285 | RandMVLearn 286 | RandomForest 287 | Rborist 288 | Rbrul 289 | Rcmdr 290 | RcmdrMisc 291 | Rcpp 292 | RcppArmadillo 293 | RcppGSL 294 | RcppRoll 295 | RcppZiggurat 296 | ReactomePA 297 | RecordLinkage 298 | RedditExtractoR 299 | ReienforcementLearning 300 | ReinforcementLearning 301 | RelDists 302 | ResourceSelection 303 | Rfast 304 | RgoogleMaps 305 | Rgraphviz 306 | RhpcBLASctl 307 | Rlab 308 | Rmisc 309 | Rmixmod 310 | Rmpfr 311 | Rnalytica 312 | Rnumerai 313 | Robyn 314 | Rserve 315 | Rsolnp 316 | Rssa 317 | Rtsne 318 | Rwtss 319 | Ryacas0 320 | SDMTools 321 | SHAPforxgboost 322 | SIS 323 | SKP 324 | SLOPE 325 | SNFtool 326 | SNScan 327 | SNscan 328 | STRINGdb 329 | SVMMaj 330 | Scales 331 | SciViews 332 | SemNetCleaner 333 | SentimentAnalysis 334 | Seurat 335 | SeuratData 336 | SeuratDisk 337 | SeuratObject 338 | SeuratWrappers 339 | SimDesign 340 | Simpsons 341 | SingleCellExperiment 342 | SingleCellMultiModal 343 | SingleR 344 | SixSigma 345 | SmartEDA 346 | SnowballC 347 | SoupX 348 | SparkR 349 | SparseM 350 | SpecsVerification 351 | Spillover 352 | StMoMo 353 | StabMap 354 | StableEstim 355 | StatsBombR 356 | SummarizedExperiment 357 | TCGAbiolinks 358 | TDbasedUFE 359 | TMB 360 | TSA 361 | TSLSTM 362 | TSclust 363 | TSdist 364 | TSstudio 365 | TTR 366 | TeachingDemos 367 | Ternary 368 | Teste 369 | Tmisc 370 | TraMineR 371 | True 372 | TwoSampleMR 373 | UBL 374 | USAboundaries 375 | Unicode 376 | UpSetR 377 | UserNetR 378 | UsingR 379 | VGAM 380 | VIF 381 | VIM 382 | VariantAnnotation 383 | VennDiagram 384 | VineCopula 385 | WDI 386 | WGCNA 387 | WVPlots 388 | WeightedROC 389 | XLConnect 390 | XML 391 | XML2R 392 | a 393 | aTSA 394 | abind 395 | actuaRE 396 | actuar 397 | ada 398 | adabag 399 | adagio 400 | addinslist 401 | ade4 402 | adegraphics 403 | afex 404 | affy 405 | aglm 406 | agricolae 407 | agua 408 | ahptopsis2n 409 | airway 410 | akc 411 | akima 412 | akmeans 413 | ale 414 | alluvial 415 | alr4 416 | altair 417 | amap 418 | andrews 419 | animation 420 | anomalize 421 | anytime 422 | aod 423 | apcluster 424 | ape 425 | aplot 426 | apollo 427 | ardl 428 | arett 429 | arfima 430 | aricode 431 | arm 432 | arrow 433 | ars 434 | arsenal 435 | artfima 436 | arules 437 | arulesViz 438 | arulezviz 439 | aspace 440 | assertive 441 | assertr 442 | assertthat 443 | astsa 444 | autoReg 445 | autoimage 446 | automap 447 | autothresholdr 448 | autoxgboost 449 | av 450 | aweek 451 | babynames 452 | backports 453 | baguette 454 | bangladesh 455 | bartMachine 456 | base 457 | base64enc 458 | bayesGARCH 459 | bayesPrism 460 | bayesQR 461 | bayesm 462 | bayesplot 463 | bayestestR 464 | bayfoxr 465 | bazar 466 | bbmle 467 | bcp 468 | bdscale 469 | beanplot 470 | bedr 471 | beepr 472 | beeswarm 473 | benchmarkme 474 | berryFunctions 475 | bestNormalize 476 | bestglm 477 | betareg 478 | biOps 479 | bibliometrix 480 | biclust 481 | big_bang_data 482 | biglm 483 | bigmemory 484 | bigrquery 485 | bigstatsr 486 | bigstep 487 | billboarder 488 | binance 489 | binancer 490 | bindrcpp 491 | binom 492 | biomaRt 493 | biomod2 494 | biosignalEMG 495 | biotools 496 | bipartite 497 | birk 498 | bit64 499 | bitops 500 | blockcpd 501 | bmp 502 | bnclassify 503 | bnlearn 504 | bonsai 505 | bookdown 506 | boot 507 | bootnet 508 | bootstrap 509 | bpCausal 510 | brant 511 | breakDown 512 | brew 513 | bridgesampling 514 | brms 515 | brnn 516 | broom 517 | bruceR 518 | brulee 519 | bslib 520 | bspm 521 | bsselectR 522 | bsts 523 | bupaR 524 | bvars 525 | ca 526 | caTools 527 | car 528 | carData 529 | caracas 530 | caret 531 | caretEnsemble 532 | cartography 533 | caschrono 534 | catboost 535 | catdata 536 | causalTree 537 | cbsshape 538 | cccp 539 | cclust 540 | cellWise 541 | celldex 542 | changepoint 543 | checkmate 544 | checkpoint 545 | chinamap 546 | chirps 547 | chorddiag 548 | choroplethr 549 | choroplethrMaps 550 | chron 551 | circlize 552 | cit 553 | clValid 554 | class 555 | classInt 556 | cld2 557 | cleanNLP 558 | cleaner 559 | cli 560 | climatol 561 | climbeR 562 | clpfd 563 | clue 564 | clustMixType 565 | cluster 566 | clusterCrit 567 | clusterProfiler 568 | clusterSim 569 | clustertend 570 | clustrd 571 | clustree 572 | clv 573 | cmdstanr 574 | cmsafops 575 | coarseDataTools 576 | cobalt 577 | cocor 578 | coda 579 | coefplot 580 | coin 581 | collapse 582 | collapsibleTree 583 | collegehoops 584 | colorplaner 585 | colorspace 586 | combinat 587 | compare 588 | compareGroups 589 | comprehenr 590 | concaveman 591 | conflicted 592 | conformal 593 | conjoint 594 | contfrac 595 | coop 596 | copula 597 | copykat 598 | corels 599 | coro 600 | corpcor 601 | corpus 602 | corr 603 | correlation 604 | correlationfunnel 605 | corrgram 606 | corrplot 607 | corrr 608 | countrycode 609 | coursekata 610 | covidcast 611 | cowplot 612 | coxed 613 | coxme 614 | crayon 615 | cricketdata 616 | cropcircles 617 | crosstalk 618 | crypto 619 | crypto2 620 | crypto3 621 | cubature 622 | cubing 623 | curl 624 | cutpointr 625 | cvAUC 626 | cvms 627 | cyclistic 628 | d 629 | d3Network 630 | d3Tree 631 | d3heatmap 632 | d3treeR 633 | dRCT 634 | dada2 635 | dagitty 636 | dashboard 637 | data 638 | dataMaid 639 | dataPreparation 640 | dataQualityR 641 | datamodelr 642 | datarium 643 | datasauRus 644 | dataset 645 | datasets 646 | datawizard 647 | date 648 | datos 649 | dbConnect 650 | dbarts 651 | dbplyr 652 | dbscan 653 | ddpcr 654 | ddply 655 | deSolve 656 | deducorrect 657 | deepnet 658 | deeptrafo 659 | deldir 660 | demography 661 | dendextend 662 | deplyr 663 | depmixS4 664 | desc 665 | descr 666 | designr 667 | desirability 668 | devEMF 669 | devtools 670 | df 671 | dgof 672 | diagram 673 | dial 674 | dials 675 | dichromat 676 | did 677 | dient 678 | diffpriv 679 | digest 680 | dils 681 | dimRed 682 | directlabels 683 | discrim 684 | dismo 685 | distrEx 686 | dlm 687 | dlookr 688 | dlpsych 689 | dnaMethyAge 690 | doBy 691 | doFuture 692 | doMC 693 | doParallel 694 | doRNG 695 | doSNOW 696 | docopt 697 | dosearch 698 | dots 699 | dotwhisker 700 | doy 701 | dply 702 | dplyr 703 | dpyr 704 | drat 705 | drc 706 | dslabs 707 | dst 708 | dtplyr 709 | dtw 710 | dtwclust 711 | duckdb 712 | dummies 713 | dummy 714 | dygraphs 715 | dynamicTreeCut 716 | dynlm 717 | dynr 718 | dyplr 719 | e1071 720 | eRm 721 | earth 722 | easyGgplot2 723 | easyalluvial 724 | easypackages 725 | easyr 726 | echarts4r 727 | ecodist 728 | ecolca 729 | economiccomplexity 730 | edfReader 731 | edgeR 732 | edgebundleR 733 | edit 734 | editrules 735 | eeptools 736 | effects 737 | effectsize 738 | effisr 739 | effsize 740 | ega 741 | egg 742 | eha 743 | elasticnet 744 | elect 745 | elevatr 746 | ellipse 747 | elo 748 | em 749 | embed 750 | emmeans 751 | emo 752 | energy 753 | english 754 | enrichplot 755 | ensembleR 756 | entity 757 | entropy 758 | epiDisplay 759 | epitools 760 | ergm 761 | esquisse 762 | estimatr 763 | eulerr 764 | eurostat 765 | eva 766 | evacure 767 | evaluate 768 | evir 769 | evtree 770 | explor 771 | explore 772 | exploreR 773 | expm 774 | expsmooth 775 | expss 776 | extraDistr 777 | extraTrees 778 | extracat 779 | extrafont 780 | extrafontdb 781 | extrantsr 782 | extrasteps 783 | ez 784 | fArma 785 | fAssets 786 | fBasics 787 | fGarch 788 | fMultivar 789 | fOptions 790 | fPortfolio 791 | fUnitRoots 792 | fable 793 | fabletools 794 | factoextra 795 | factorMerger 796 | fairML 797 | fansi 798 | faraway 799 | fastAdaboost 800 | fastDummies 801 | fastICA 802 | fastNaiveBayes 803 | fastai 804 | fastcluster 805 | fastknn 806 | fastmap 807 | fastmatch 808 | fastmatrix 809 | fasttime 810 | fbi 811 | fbrs 812 | fclust 813 | fda 814 | feasts 815 | feather 816 | fedmatch 817 | ff 818 | fields 819 | fiftystater 820 | filesstrings 821 | filtered_netflix_prize_User 822 | fin_10k_june_2024 823 | finalfit 824 | finetune 825 | fingerprint 826 | fitbit 827 | fitdistrplus 828 | fivethirtyeight 829 | fixest 830 | flare 831 | flashClust 832 | flashlight 833 | flexclust 834 | flexdashboard 835 | flexmix 836 | flexsurv 837 | flextable 838 | float 839 | fmcsR 840 | fmerPack 841 | fmsb 842 | fontawesome 843 | forcats 844 | foreach 845 | forecast 846 | foreign 847 | forescast 848 | forestplot 849 | forestploter 850 | formatR 851 | formattable 852 | formula1data 853 | fpc 854 | fpp 855 | fpp2 856 | fpp3 857 | fracdiff 858 | frbs 859 | fredr 860 | freqtables 861 | fs 862 | fslr 863 | fst 864 | funModeling 865 | furrr 866 | future 867 | fuzzyjoin 868 | gRain 869 | gRbase 870 | gains 871 | gam 872 | gamlss 873 | gapminder 874 | gargle 875 | garma 876 | gbm 877 | gcla 878 | gclus 879 | gcookbook 880 | gdata 881 | geepack 882 | gender 883 | genderdata 884 | genefilter 885 | generics 886 | genridge 887 | geoR 888 | geobr 889 | geodata 890 | geofacet 891 | geojsonio 892 | geojsonsf 893 | geomorph 894 | geomtextpath 895 | geospe 896 | geosphere 897 | ggExtra 898 | ggThemeAssist 899 | ggTimeSeries 900 | ggVennDiagram 901 | ggalluvial 902 | ggalt 903 | gganimate 904 | ggarrange 905 | ggart 906 | ggbeeswarm 907 | ggbiplot 908 | ggbump 909 | ggchicklet 910 | ggcor 911 | ggcorr 912 | ggcorrplot 913 | ggdag 914 | ggdark 915 | ggdendro 916 | ggdist 917 | ggeasy 918 | ggeffects 919 | ggfittext 920 | ggflags 921 | ggforce 922 | ggformula 923 | ggfortify 924 | ggh4x 925 | gghalves 926 | gghighlight 927 | ggimage 928 | gginference 929 | ggiraph 930 | ggiraphExtra 931 | ggjoy 932 | gglasso 933 | ggmap 934 | ggmcmc 935 | ggmice 936 | ggmosaic 937 | ggmsa 938 | ggnewscale 939 | ggparallel 940 | ggparliament 941 | ggpie 942 | ggplate 943 | ggplot 944 | ggplot2 945 | ggplotify 946 | ggplots 947 | ggpmisc 948 | ggprism 949 | ggpubr 950 | ggraph 951 | ggrastr 952 | ggrepel 953 | ggridges 954 | ggrpah 955 | ggsankey 956 | ggscatterstats 957 | ggsci 958 | ggshadow 959 | ggside 960 | ggsignif 961 | ggspatial 962 | ggstance 963 | ggstats 964 | ggstatsplot 965 | ggstream 966 | ggsubplot 967 | ggsurvfit 968 | ggtext 969 | ggthemes 970 | ggthemr 971 | ggtree 972 | ggvenn 973 | ggvis 974 | ggwordcloud 975 | ghql 976 | gifski 977 | giscoR 978 | githubinstall 979 | glarma 980 | glimpse 981 | glm2 982 | glmmLasso 983 | glmmTMB 984 | glmnet 985 | glmtoolbox 986 | glmulti 987 | glpk 988 | glue 989 | gmapsdistance 990 | gmodels 991 | gofastr 992 | goft 993 | goftest 994 | googleLanguageR 995 | googleVis 996 | googledrive 997 | googlesheets4 998 | googleway 999 | gpclib 1000 | gplots 1001 | gprofiler2 1002 | gpuR 1003 | grDevices 1004 | graph 1005 | graphics 1006 | graphlayouts 1007 | gratis 1008 | grepl 1009 | greybox 1010 | grf 1011 | grid 1012 | gridBase 1013 | gridExtra 1014 | gridGraphics 1015 | gridtext 1016 | groupdata2 1017 | grpreg 1018 | gsheet 1019 | gstat 1020 | gsubfn 1021 | gt 1022 | gtExtras 1023 | gtable 1024 | gtools 1025 | gtrendsR 1026 | gtsummary 1027 | gutenbergr 1028 | gvlma 1029 | h2o 1030 | h2o4gpu 1031 | hablar 1032 | hadoopStreaming 1033 | hard 1034 | hardhat 1035 | harmony 1036 | harrypotter 1037 | hash 1038 | hashmap 1039 | haven 1040 | hdm 1041 | hdrcde 1042 | heatmaply 1043 | heplots 1044 | here 1045 | hett 1046 | hexbin 1047 | hfhub 1048 | hflights 1049 | highcharter 1050 | highr 1051 | histogram 1052 | hmeasure 1053 | hms 1054 | hnp 1055 | hrbrthemes 1056 | hsmm 1057 | hstats 1058 | htmlTable 1059 | htmltab 1060 | htmltools 1061 | htmlwidgets 1062 | hts 1063 | httr 1064 | httr2 1065 | huge 1066 | hunspell 1067 | huxtable 1068 | hydroGOF 1069 | hydroTSM 1070 | i 1071 | iDINGO 1072 | iDeepViewLearn 1073 | ica 1074 | icesTAF 1075 | igrap 1076 | igraph 1077 | igrha 1078 | igrhap 1079 | imager 1080 | imbalance 1081 | imiverse 1082 | iml 1083 | imputeMissings 1084 | imputeTS 1085 | ineq 1086 | infer 1087 | infotheo 1088 | insight 1089 | inspectdf 1090 | installr 1091 | insuranceData 1092 | interactions 1093 | intergraph 1094 | intsvy 1095 | intubate 1096 | invgamma 1097 | ipred 1098 | iris 1099 | irlba 1100 | irr 1101 | irrCAC 1102 | ismev 1103 | isotree 1104 | iterators 1105 | itsmr 1106 | ivmodel 1107 | ivprobit 1108 | janeaustenr 1109 | janitor 1110 | jiebaR 1111 | jitter 1112 | jmv 1113 | jpeg 1114 | jskm 1115 | json 1116 | jsonlite 1117 | jtools 1118 | kableExtra 1119 | katadasaR 1120 | kdecopula 1121 | keras 1122 | keras3 1123 | kerasR 1124 | kerastuneR 1125 | kernelshap 1126 | kernlab 1127 | kit 1128 | kknn 1129 | klaR 1130 | knitr 1131 | knncat 1132 | knockoff 1133 | kohonen 1134 | kormaps2014 1135 | kpcalg 1136 | ks 1137 | kselection 1138 | labdsv 1139 | labeling 1140 | labelled 1141 | lares 1142 | largeVis 1143 | lars 1144 | latex2exp 1145 | lattice 1146 | latticeExtra 1147 | lavaan 1148 | lawstat 1149 | lazyWeave 1150 | lazyeval 1151 | lcmm 1152 | lda 1153 | ldatuning 1154 | leaflet 1155 | leafpop 1156 | leafsync 1157 | leaps 1158 | learningr 1159 | learntidymodels 1160 | lehdr 1161 | lemon 1162 | lessR 1163 | lettercase 1164 | lexRankr 1165 | lexicon 1166 | lexiconPT 1167 | lfda 1168 | lfe 1169 | lib 1170 | lib_fname 1171 | lib_name 1172 | library_name 1173 | libreria 1174 | lightgbm 1175 | likert 1176 | lime 1177 | limma 1178 | linelist 1179 | linkET 1180 | linr 1181 | lists 1182 | listviewer 1183 | llama 1184 | lmSupport 1185 | lme4 1186 | lmerTest 1187 | lmreg 1188 | lmtest 1189 | locfit 1190 | logKDE 1191 | logbin 1192 | logistf 1193 | logisticPCA 1194 | loo 1195 | lordif 1196 | lpSolve 1197 | lpSolveAPI 1198 | lqa 1199 | lsa 1200 | lsei 1201 | lsmeans 1202 | lsr 1203 | ltm 1204 | lubricate 1205 | lubridale 1206 | lubridat 1207 | lubridate 1208 | lulcc 1209 | lwgeom 1210 | mFilter 1211 | ma 1212 | magicfor 1213 | magick 1214 | magrittr 1215 | mailR 1216 | mapdata 1217 | mapmisc 1218 | mapproj 1219 | maps 1220 | mapsapi 1221 | mapsf 1222 | maptools 1223 | maptree 1224 | mapview 1225 | marginaleffects 1226 | margins 1227 | marima 1228 | markdown 1229 | markovchain 1230 | matlib 1231 | matplotlib 1232 | matrixStats 1233 | matrixcalc 1234 | matrixdist 1235 | matrixpls 1236 | mboost 1237 | mc2d 1238 | mcbiopi 1239 | mccr 1240 | mclust 1241 | mctest 1242 | mda 1243 | mdsr 1244 | measurements 1245 | meboot 1246 | mechkar 1247 | mediation 1248 | mefa 1249 | meffonym 1250 | memery 1251 | memisc 1252 | meta 1253 | metacoder 1254 | metafor 1255 | metaviz 1256 | methods 1257 | methylGSA 1258 | metricsgraphics 1259 | mfx 1260 | mgarchBEKK 1261 | mgcv 1262 | mgm 1263 | mice 1264 | miceadds 1265 | microbenchmark 1266 | microdatasus 1267 | mime 1268 | minfi 1269 | minqa 1270 | mirt 1271 | mirtCAT 1272 | misc3d 1273 | miscTools 1274 | miscset 1275 | missForest 1276 | missRanger 1277 | misty 1278 | mixOmics 1279 | mixlm 1280 | mixtool 1281 | mixtools 1282 | mlbench 1283 | mlflow 1284 | mlmRev 1285 | mlmhelpr 1286 | mlogit 1287 | mlr 1288 | mlr3 1289 | mlr3benchmark 1290 | mlr3extralearners 1291 | mlr3learners 1292 | mlr3pipelines 1293 | mlr3proba 1294 | mlr3tuning 1295 | mlr3verse 1296 | mlr3viz 1297 | mlrMBO 1298 | mltest 1299 | mltools 1300 | mnormt 1301 | modeest 1302 | modelbased 1303 | modeldata 1304 | modelr 1305 | modelsummary 1306 | modeltime 1307 | modeltools 1308 | moderndive 1309 | modi 1310 | mogsa 1311 | moments 1312 | mongolite 1313 | monomvn 1314 | moonBook 1315 | morpheus 1316 | mosaic 1317 | mosaicCore 1318 | mosaicData 1319 | mpmi 1320 | msa 1321 | msigdbr 1322 | msm 1323 | mstate 1324 | mtsdi 1325 | multcomp 1326 | multcompView 1327 | multiHiCcompare 1328 | multiUS 1329 | multilinguer 1330 | multimode 1331 | munsell 1332 | mvlearnR 1333 | mvnTest 1334 | mvnfast 1335 | mvnorm 1336 | mvnormalTest 1337 | mvnormtest 1338 | mvoutlier 1339 | mvtnorm 1340 | mxnet 1341 | mycor 1342 | mzR 1343 | nCov2019 1344 | nFactors 1345 | nVennR 1346 | nabor 1347 | naivebayes 1348 | name_of_package 1349 | naniar 1350 | nbastatR 1351 | ncdf4 1352 | ncvreg 1353 | ndjson 1354 | ndtv 1355 | needs 1356 | netbiov 1357 | network 1358 | networkD3 1359 | networkDynamic 1360 | neuralnet 1361 | neurobase 1362 | newsmap 1363 | nflfastR 1364 | nflverse 1365 | ngram 1366 | ngrok 1367 | ngspatial 1368 | nhanesA 1369 | nichenetr 1370 | nimble 1371 | nlme 1372 | nloptr 1373 | nlstools 1374 | nnet 1375 | nnfor 1376 | nomclust 1377 | noncensus 1378 | norm 1379 | normtest 1380 | nortest 1381 | np 1382 | npsurv 1383 | nsprcomp 1384 | numDeriv 1385 | numbers 1386 | nycflights13 1387 | odbc 1388 | officer 1389 | olsrr 1390 | onehot 1391 | openNLP 1392 | openai 1393 | openair 1394 | openalexR 1395 | opencv 1396 | opendatasets 1397 | opendatatoronto 1398 | openintro 1399 | openxlsx 1400 | oppar 1401 | optimParallel 1402 | optimization 1403 | optimr 1404 | optimx 1405 | optmatch 1406 | optrees 1407 | orcutt 1408 | ordinal 1409 | ordinalNet 1410 | osmdata 1411 | osrm 1412 | outForest 1413 | outbreaks 1414 | outliers 1415 | p2distance 1416 | pROC 1417 | packHV 1418 | package 1419 | package_name 1420 | packagename 1421 | packcircles 1422 | pacman 1423 | padr 1424 | paletteer 1425 | palmerpenguins 1426 | pals 1427 | pamr 1428 | pander 1429 | paradox 1430 | paragraph 1431 | parallel 1432 | parallelMap 1433 | parallelSVM 1434 | parallelly 1435 | parallelplot 1436 | parameters 1437 | paran 1438 | parcats 1439 | parquetize 1440 | parsnip 1441 | partitions 1442 | party 1443 | partykit 1444 | pastecs 1445 | patchwork 1446 | patchworks 1447 | path 1448 | pbapply 1449 | pbkrtest 1450 | pcaGoPromoter 1451 | pcaMethods 1452 | pcaPP 1453 | pcalg 1454 | pdftools 1455 | pdist 1456 | pdp 1457 | pec 1458 | pedometrics 1459 | pedquant 1460 | penPHcure 1461 | penalizedLDA 1462 | penguins 1463 | performance 1464 | performanceEstimation 1465 | pgirmess 1466 | pglm 1467 | pgmm 1468 | phangorn 1469 | pheatmap 1470 | phia 1471 | philentropy 1472 | phonTools 1473 | phonics 1474 | phyloseq 1475 | phytools 1476 | pid 1477 | pillar 1478 | pins 1479 | pipeR 1480 | pitchRx 1481 | pivottabler 1482 | pkg 1483 | planex 1484 | pliman 1485 | plm 1486 | plot3D 1487 | plotROC 1488 | plot_ly 1489 | plotly 1490 | plotmo 1491 | plotrix 1492 | pls 1493 | plsRglm 1494 | plsVarSel 1495 | plumber 1496 | plyr 1497 | png 1498 | poLCA 1499 | poibin 1500 | poissonreg 1501 | politicaldata 1502 | polycor 1503 | popsom 1504 | portes 1505 | possum 1506 | posterior 1507 | poweRlaw 1508 | powerAnalysis 1509 | ppclust 1510 | ppcor 1511 | prabclus 1512 | pracma 1513 | preText 1514 | precrec 1515 | prediction 1516 | predictionr 1517 | preprocess 1518 | prettyR 1519 | prettydoc 1520 | priceR 1521 | printr 1522 | prob 1523 | probably 1524 | processpredictR 1525 | prodlim 1526 | productplots 1527 | profvis 1528 | progress 1529 | prophet 1530 | propogate 1531 | prospectr 1532 | proto 1533 | proxy 1534 | proxyC 1535 | pryr 1536 | pscl 1537 | psy 1538 | psych 1539 | psychometric 1540 | ptw 1541 | pubr 1542 | purrr 1543 | purrrlyr 1544 | pvclust 1545 | pwalign 1546 | pwr 1547 | qcc 1548 | qdap 1549 | qdapDictionaries 1550 | qdapRegex 1551 | qdapTools 1552 | qeML 1553 | qgam 1554 | qgraph 1555 | qpcR 1556 | qqconf 1557 | qqplotr 1558 | qrmdata 1559 | qrmtools 1560 | qs 1561 | qtl 1562 | qtlcharts 1563 | quadprog 1564 | qualR 1565 | quanteda 1566 | quantmod 1567 | quantreg 1568 | quantstrat 1569 | quarto 1570 | questionr 1571 | r2d3 1572 | r2rtf 1573 | rARPACK 1574 | rAmCharts 1575 | rBayesianOptimization 1576 | rJava 1577 | rMaps 1578 | radarchart 1579 | rafalib 1580 | ragg 1581 | rainfarmr 1582 | ramextest 1583 | ramify 1584 | random 1585 | randomForest 1586 | randomForestExplainer 1587 | randomForestSRC 1588 | randomcoloR 1589 | randomforest 1590 | randomizr 1591 | randtests 1592 | ranger 1593 | rapportools 1594 | raster 1595 | rasterVis 1596 | rattle 1597 | rayrender 1598 | rayshader 1599 | rbcb 1600 | rbokeh 1601 | rcartocolor 1602 | rcdk 1603 | rcompanion 1604 | re 1605 | reReg 1606 | reactable 1607 | readbitmap 1608 | readcsv 1609 | reader 1610 | readr 1611 | readstata13 1612 | readtext 1613 | readxl 1614 | rebmix 1615 | rebus 1616 | recipes 1617 | recomenderlab 1618 | recommendations 1619 | recommenderlab 1620 | recosystem 1621 | regclass 1622 | regtools 1623 | relaimpo 1624 | reldist 1625 | remotes 1626 | renv 1627 | repmis 1628 | report 1629 | repr 1630 | repurrrsive 1631 | reservr 1632 | reshape 1633 | reshape2 1634 | rethinking 1635 | reticulate 1636 | rex 1637 | rfm 1638 | rgdal 1639 | rgeopat2 1640 | rgeos 1641 | rgho 1642 | rgl 1643 | rglwidget 1644 | rhdf5 1645 | ridge 1646 | ridyverse 1647 | rigr 1648 | riingo 1649 | rio 1650 | riskDistributions 1651 | risksetROC 1652 | rjags 1653 | rjson 1654 | rjsonlite 1655 | rkafka 1656 | rlang 1657 | rlist 1658 | rmarkdown 1659 | rmcmc 1660 | rmdformats 1661 | rmdtools 1662 | rmgarch 1663 | rminer 1664 | rmr2 1665 | rms 1666 | rmutil 1667 | rnaturalearth 1668 | rnaturalearthdata 1669 | rnaturalearthhires 1670 | rnn 1671 | robotstxt 1672 | robust 1673 | robustX 1674 | robustbase 1675 | robyn 1676 | rockchalk 1677 | roll 1678 | rootSolve 1679 | ropls 1680 | rotationForest 1681 | rowr 1682 | roxygen2 1683 | rpart 1684 | rpartScore 1685 | rpartplot 1686 | rpivotTable 1687 | rplaywright 1688 | rpostgis 1689 | rrBLUP 1690 | rrcov 1691 | rsample 1692 | rsconnect 1693 | rsm 1694 | rstac 1695 | rstan 1696 | rstanarm 1697 | rstatix 1698 | rstudioapi 1699 | rsvg 1700 | rtweet 1701 | rugarch 1702 | rules 1703 | runner 1704 | runway 1705 | rvest 1706 | rwa 1707 | rwhatsapp 1708 | rworldmap 1709 | rworldxtra 1710 | s2 1711 | sCRNAseg 1712 | sCRNAseq 1713 | sampling 1714 | sand 1715 | sandwich 1716 | sarima 1717 | sasLM 1718 | satellite 1719 | scDblFinder 1720 | scRNAseq 1721 | scales 1722 | scater 1723 | scatterplot3d 1724 | scico 1725 | scmamp 1726 | scorecard 1727 | scorer 1728 | scoringRules 1729 | scran 1730 | scrubr 1731 | scuttle 1732 | sda 1733 | sdcMicro 1734 | sde 1735 | sdm 1736 | sdmvspecies 1737 | search_query 1738 | seasonal 1739 | seasonalview 1740 | seastests 1741 | see 1742 | seededlda 1743 | seewave 1744 | segMGarch 1745 | segmented 1746 | selectiveInference 1747 | selectr 1748 | self 1749 | sem 1750 | semPlot 1751 | semTools 1752 | sensemakr 1753 | sentimentr 1754 | seqinr 1755 | servr 1756 | sesame 1757 | sesameData 1758 | sets 1759 | sf 1760 | sfnetworks 1761 | shadowtext 1762 | shap 1763 | shapley 1764 | shapper 1765 | shapr 1766 | shapviz 1767 | shiny 1768 | shinyWidgets 1769 | shinyanimate 1770 | shinycssloaders 1771 | shinydashboard 1772 | shinyjs 1773 | shinystan 1774 | shinythemes 1775 | showtext 1776 | sidrar 1777 | sigFeature 1778 | sigmajs 1779 | signal 1780 | simArray 1781 | simdesign 1782 | simmer 1783 | simpleboot 1784 | simputation 1785 | simstudy 1786 | singleR 1787 | sits 1788 | sitsdata 1789 | sjPlot 1790 | sjlabelled 1791 | sjmisc 1792 | sjp 1793 | sjstats 1794 | skd 1795 | skim 1796 | skimr 1797 | skirr 1798 | skmeans 1799 | slam 1800 | slider 1801 | slingshot 1802 | sm 1803 | smacof 1804 | smbinning 1805 | smmr 1806 | smooth 1807 | smotefamily 1808 | smplot2 1809 | sn 1810 | sna 1811 | sndfile 1812 | snow 1813 | snowfall 1814 | socialmixr 1815 | socviz 1816 | sodium 1817 | softImpute 1818 | solitude 1819 | solution 1820 | sp 1821 | spData 1822 | spDataLarge 1823 | spThin 1824 | spacyr 1825 | spam 1826 | sparkline 1827 | sparklyr 1828 | spatialEpi 1829 | spatialreg 1830 | spatstat 1831 | spdep 1832 | spdplyr 1833 | speedglm 1834 | spgs 1835 | spgwr 1836 | spida2 1837 | spikeslab 1838 | splancs 1839 | splines 1840 | splitTools 1841 | splitstackshape 1842 | splm 1843 | spmoran 1844 | spotifyr 1845 | spsh 1846 | sqldf 1847 | sqlitedf 1848 | ssc 1849 | ssr 1850 | stabledist 1851 | stabs 1852 | stacks 1853 | stargazer 1854 | stars 1855 | statInt 1856 | statebins 1857 | states 1858 | statmod 1859 | statnet 1860 | stats 1861 | stats4 1862 | statsr 1863 | stdmod 1864 | stm 1865 | stopwords 1866 | strava 1867 | streamR 1868 | streamgraph 1869 | stringR 1870 | stringdist 1871 | stringi 1872 | stringr 1873 | strucchange 1874 | stylo 1875 | summarytools 1876 | sunburstR 1877 | superheat 1878 | superml 1879 | survcomp 1880 | survex 1881 | survey 1882 | survival 1883 | survivalmodels 1884 | survminer 1885 | svMisc 1886 | sva 1887 | svars 1888 | svglite 1889 | swat 1890 | synthpop 1891 | sys 1892 | sysfonts 1893 | sysid 1894 | syuzhet 1895 | taRifx 1896 | table1 1897 | tableone 1898 | tabnet 1899 | tabplot 1900 | tabulator 1901 | tabulizer 1902 | tabulizerjars 1903 | tapply 1904 | tcltk 1905 | tcltk2 1906 | tdigest 1907 | tensor 1908 | terra 1909 | tesorflow 1910 | testthat 1911 | texreg 1912 | text 1913 | text2vec 1914 | textTinyR 1915 | textcat 1916 | textclean 1917 | textdata 1918 | textir 1919 | textmineR 1920 | textplot 1921 | textrank 1922 | textrecipes 1923 | textreuse 1924 | textstem 1925 | tfarima 1926 | tfautograph 1927 | tfdatasets 1928 | tfestimators 1929 | tfprobability 1930 | tfruns 1931 | the_code 1932 | the_library 1933 | thematic 1934 | themis 1935 | threejs 1936 | tibble 1937 | tibbletime 1938 | tictoc 1939 | tiddyvers 1940 | tidiverse 1941 | tidy 1942 | tidycensus 1943 | tidycorels 1944 | tidygeocoder 1945 | tidygraph 1946 | tidyjson 1947 | tidylog 1948 | tidymodels 1949 | tidypredict 1950 | tidyquant 1951 | tidyr 1952 | tidyselect 1953 | tidytable 1954 | tidytext 1955 | tidyv 1956 | tidyverse 1957 | tidyxl 1958 | tiff 1959 | tifyverse 1960 | tigerstats 1961 | tigris 1962 | time2season 1963 | timeDate 1964 | timeOmics 1965 | timeSeries 1966 | timechange 1967 | timetk 1968 | timevis 1969 | tinytex 1970 | tis 1971 | titanic 1972 | tm 1973 | tmap 1974 | tmaptools 1975 | tmvnsim 1976 | tok 1977 | tokenizers 1978 | tools 1979 | tools4uplift 1980 | topGO 1981 | topicmodels 1982 | topsis 1983 | torch 1984 | torchdatasets 1985 | torchvision 1986 | tourr 1987 | transformr 1988 | transport 1989 | tree 1990 | treeheatr 1991 | treemap 1992 | treemapify 1993 | treesnip 1994 | trelliscopejs 1995 | trendseason 1996 | triangle 1997 | truncnorm 1998 | tsDyn 1999 | tsbox 2000 | tscount 2001 | tseries 2002 | tsfeatures 2003 | tsibble 2004 | tsibbledata 2005 | tsintermittent 2006 | tsm 2007 | tsne 2008 | tsoutliers 2009 | tsutils 2010 | tswge 2011 | tuber 2012 | tufte 2013 | tune 2014 | tuneR 2015 | tvthemes 2016 | twang 2017 | tweenr 2018 | twitteR 2019 | tydivers 2020 | tydiverse 2021 | udpipe 2022 | ulam 2023 | umap 2024 | unbalanced 2025 | uniswappeR2 2026 | units 2027 | unpivotr 2028 | unstable 2029 | unzip 2030 | urbnmapr 2031 | urca 2032 | urltools 2033 | uroot 2034 | usdata 2035 | usdm 2036 | useful 2037 | usemodels 2038 | usethis 2039 | usmap 2040 | utf8 2041 | utils 2042 | uwot 2043 | vader 2044 | validate 2045 | varSelRF 2046 | varhandle 2047 | vars 2048 | vartest 2049 | vcd 2050 | vcdExtra 2051 | vctrs 2052 | vegan 2053 | venneuler 2054 | verification 2055 | vetiver 2056 | vignette 2057 | vioplot 2058 | vip 2059 | viridis 2060 | viridisLite 2061 | visNetwork 2062 | visdat 2063 | visdata 2064 | visreg 2065 | vistime 2066 | visualize 2067 | voxel 2068 | vroom 2069 | vtable 2070 | vtreat 2071 | vtree 2072 | wCorr 2073 | waffle 2074 | waldo 2075 | warbleR 2076 | warnings 2077 | wavelets 2078 | wbacon 2079 | wbstats 2080 | webr 2081 | webshot 2082 | weibullness 2083 | weibulltools 2084 | wesanderson 2085 | whitestrap 2086 | widgetframe 2087 | widyr 2088 | wildcard 2089 | withr 2090 | wk 2091 | woe 2092 | woeBinning 2093 | wooldridge 2094 | word2vec 2095 | wordVectors 2096 | wordcloud 2097 | wordcloud2 2098 | workflows 2099 | workflowsets 2100 | worldfootballR 2101 | write_ 2102 | writexl 2103 | wru 2104 | x 2105 | xfun 2106 | xgb 2107 | xgboost 2108 | xgboostExplainer 2109 | xkcd 2110 | xlrd 2111 | xlsx 2112 | xm12 2113 | xml 2114 | xml2 2115 | xtable 2116 | xts 2117 | yahoofinancer 2118 | yaml 2119 | yardstick 2120 | yarrr 2121 | yfR 2122 | yuima 2123 | z 2124 | zeallot 2125 | zellkonverter 2126 | zip 2127 | zipcode 2128 | zipfR 2129 | zipfile 2130 | zoo 2131 | -------------------------------------------------------------------------------- /rustup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # shellcheck shell=dash 3 | 4 | # This is just a little script that can be downloaded from the internet to 5 | # install rustup. It just does platform detection, downloads the installer 6 | # and runs it. 7 | 8 | # It runs on Unix shells like {a,ba,da,k,z}sh. It uses the common `local` 9 | # extension. Note: Most shells limit `local` to 1 var per line, contra bash. 10 | 11 | if [ "$KSH_VERSION" = 'Version JM 93t+ 2010-03-05' ]; then 12 | # The version of ksh93 that ships with many illumos systems does not 13 | # support the "local" extension. Print a message rather than fail in 14 | # subtle ways later on: 15 | echo 'rustup does not work with this ksh93 version; please try bash!' >&2 16 | exit 1 17 | fi 18 | 19 | 20 | set -u 21 | 22 | # If RUSTUP_UPDATE_ROOT is unset or empty, default it. 23 | RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-https://static.rust-lang.org/rustup}" 24 | 25 | #XXX: If you change anything here, please make the same changes in setup_mode.rs 26 | usage() { 27 | cat 1>&2 < Choose a default host triple 44 | --default-toolchain Choose a default toolchain to install 45 | --default-toolchain none Do not install any toolchains 46 | --profile [minimal|default|complete] Choose a profile 47 | -c, --component ... Component name to also install 48 | -t, --target ... Target name to also install 49 | EOF 50 | } 51 | 52 | main() { 53 | downloader --check 54 | need_cmd uname 55 | need_cmd mktemp 56 | need_cmd chmod 57 | need_cmd mkdir 58 | need_cmd rm 59 | need_cmd rmdir 60 | 61 | get_architecture || return 1 62 | local _arch="$RETVAL" 63 | assert_nz "$_arch" "arch" 64 | 65 | local _ext="" 66 | case "$_arch" in 67 | *windows*) 68 | _ext=".exe" 69 | ;; 70 | esac 71 | 72 | local _url="${RUSTUP_UPDATE_ROOT}/dist/${_arch}/rustup-init${_ext}" 73 | 74 | local _dir 75 | _dir="$(ensure mktemp -d)" 76 | local _file="${_dir}/rustup-init${_ext}" 77 | 78 | local _ansi_escapes_are_valid=false 79 | if [ -t 2 ]; then 80 | if [ "${TERM+set}" = 'set' ]; then 81 | case "$TERM" in 82 | xterm*|rxvt*|urxvt*|linux*|vt*) 83 | _ansi_escapes_are_valid=true 84 | ;; 85 | esac 86 | fi 87 | fi 88 | 89 | # check if we have to use /dev/tty to prompt the user 90 | local need_tty=yes 91 | for arg in "$@"; do 92 | case "$arg" in 93 | -h|--help) 94 | usage 95 | exit 0 96 | ;; 97 | -y) 98 | # user wants to skip the prompt -- we don't need /dev/tty 99 | need_tty=no 100 | ;; 101 | *) 102 | ;; 103 | esac 104 | done 105 | 106 | if $_ansi_escapes_are_valid; then 107 | printf "\33[1minfo:\33[0m downloading installer\n" 1>&2 108 | else 109 | printf '%s\n' 'info: downloading installer' 1>&2 110 | fi 111 | 112 | ensure mkdir -p "$_dir" 113 | ensure downloader "$_url" "$_file" "$_arch" 114 | ensure chmod u+x "$_file" 115 | if [ ! -x "$_file" ]; then 116 | printf '%s\n' "Cannot execute $_file (likely because of mounting /tmp as noexec)." 1>&2 117 | printf '%s\n' "Please copy the file to a location where you can execute binaries and run ./rustup-init${_ext}." 1>&2 118 | exit 1 119 | fi 120 | 121 | if [ "$need_tty" = "yes" ]; then 122 | # The installer is going to want to ask for confirmation by 123 | # reading stdin. This script was piped into `sh` though and 124 | # doesn't have stdin to pass to its children. Instead we're going 125 | # to explicitly connect /dev/tty to the installer's stdin. 126 | if [ ! -t 1 ]; then 127 | err "Unable to run interactively. Run with -y to accept defaults, --help for additional options" 128 | fi 129 | 130 | ignore "$_file" "$@" < /dev/tty 131 | else 132 | ignore "$_file" "$@" 133 | fi 134 | 135 | local _retval=$? 136 | 137 | ignore rm "$_file" 138 | ignore rmdir "$_dir" 139 | 140 | return "$_retval" 141 | } 142 | 143 | check_proc() { 144 | # Check for /proc by looking for the /proc/self/exe link 145 | # This is only run on Linux 146 | if ! test -L /proc/self/exe ; then 147 | err "fatal: Unable to find /proc/self/exe. Is /proc mounted? Installation cannot proceed without /proc." 148 | fi 149 | } 150 | 151 | get_bitness() { 152 | need_cmd head 153 | # Architecture detection without dependencies beyond coreutils. 154 | # ELF files start out "\x7fELF", and the following byte is 155 | # 0x01 for 32-bit and 156 | # 0x02 for 64-bit. 157 | # The printf builtin on some shells like dash only supports octal 158 | # escape sequences, so we use those. 159 | local _current_exe_head 160 | _current_exe_head=$(head -c 5 /proc/self/exe ) 161 | if [ "$_current_exe_head" = "$(printf '\177ELF\001')" ]; then 162 | echo 32 163 | elif [ "$_current_exe_head" = "$(printf '\177ELF\002')" ]; then 164 | echo 64 165 | else 166 | err "unknown platform bitness" 167 | fi 168 | } 169 | 170 | is_host_amd64_elf() { 171 | need_cmd head 172 | need_cmd tail 173 | # ELF e_machine detection without dependencies beyond coreutils. 174 | # Two-byte field at offset 0x12 indicates the CPU, 175 | # but we're interested in it being 0x3E to indicate amd64, or not that. 176 | local _current_exe_machine 177 | _current_exe_machine=$(head -c 19 /proc/self/exe | tail -c 1) 178 | [ "$_current_exe_machine" = "$(printf '\076')" ] 179 | } 180 | 181 | get_endianness() { 182 | local cputype=$1 183 | local suffix_eb=$2 184 | local suffix_el=$3 185 | 186 | # detect endianness without od/hexdump, like get_bitness() does. 187 | need_cmd head 188 | need_cmd tail 189 | 190 | local _current_exe_endianness 191 | _current_exe_endianness="$(head -c 6 /proc/self/exe | tail -c 1)" 192 | if [ "$_current_exe_endianness" = "$(printf '\001')" ]; then 193 | echo "${cputype}${suffix_el}" 194 | elif [ "$_current_exe_endianness" = "$(printf '\002')" ]; then 195 | echo "${cputype}${suffix_eb}" 196 | else 197 | err "unknown platform endianness" 198 | fi 199 | } 200 | 201 | get_architecture() { 202 | local _ostype _cputype _bitness _arch _clibtype 203 | _ostype="$(uname -s)" 204 | _cputype="$(uname -m)" 205 | _clibtype="gnu" 206 | 207 | if [ "$_ostype" = Linux ]; then 208 | if [ "$(uname -o)" = Android ]; then 209 | _ostype=Android 210 | fi 211 | if ldd --version 2>&1 | grep -q 'musl'; then 212 | _clibtype="musl" 213 | fi 214 | fi 215 | 216 | if [ "$_ostype" = Darwin ] && [ "$_cputype" = i386 ]; then 217 | # Darwin `uname -m` lies 218 | if sysctl hw.optional.x86_64 | grep -q ': 1'; then 219 | _cputype=x86_64 220 | fi 221 | fi 222 | 223 | if [ "$_ostype" = SunOS ]; then 224 | # Both Solaris and illumos presently announce as "SunOS" in "uname -s" 225 | # so use "uname -o" to disambiguate. We use the full path to the 226 | # system uname in case the user has coreutils uname first in PATH, 227 | # which has historically sometimes printed the wrong value here. 228 | if [ "$(/usr/bin/uname -o)" = illumos ]; then 229 | _ostype=illumos 230 | fi 231 | 232 | # illumos systems have multi-arch userlands, and "uname -m" reports the 233 | # machine hardware name; e.g., "i86pc" on both 32- and 64-bit x86 234 | # systems. Check for the native (widest) instruction set on the 235 | # running kernel: 236 | if [ "$_cputype" = i86pc ]; then 237 | _cputype="$(isainfo -n)" 238 | fi 239 | fi 240 | 241 | case "$_ostype" in 242 | 243 | Android) 244 | _ostype=linux-android 245 | ;; 246 | 247 | Linux) 248 | check_proc 249 | _ostype=unknown-linux-$_clibtype 250 | _bitness=$(get_bitness) 251 | ;; 252 | 253 | FreeBSD) 254 | _ostype=unknown-freebsd 255 | ;; 256 | 257 | NetBSD) 258 | _ostype=unknown-netbsd 259 | ;; 260 | 261 | DragonFly) 262 | _ostype=unknown-dragonfly 263 | ;; 264 | 265 | Darwin) 266 | _ostype=apple-darwin 267 | ;; 268 | 269 | illumos) 270 | _ostype=unknown-illumos 271 | ;; 272 | 273 | MINGW* | MSYS* | CYGWIN*) 274 | _ostype=pc-windows-gnu 275 | ;; 276 | 277 | *) 278 | err "unrecognized OS type: $_ostype" 279 | ;; 280 | 281 | esac 282 | 283 | case "$_cputype" in 284 | 285 | i386 | i486 | i686 | i786 | x86) 286 | _cputype=i686 287 | ;; 288 | 289 | xscale | arm) 290 | _cputype=arm 291 | if [ "$_ostype" = "linux-android" ]; then 292 | _ostype=linux-androideabi 293 | fi 294 | ;; 295 | 296 | armv6l) 297 | _cputype=arm 298 | if [ "$_ostype" = "linux-android" ]; then 299 | _ostype=linux-androideabi 300 | else 301 | _ostype="${_ostype}eabihf" 302 | fi 303 | ;; 304 | 305 | armv7l | armv8l) 306 | _cputype=armv7 307 | if [ "$_ostype" = "linux-android" ]; then 308 | _ostype=linux-androideabi 309 | else 310 | _ostype="${_ostype}eabihf" 311 | fi 312 | ;; 313 | 314 | aarch64 | arm64) 315 | _cputype=aarch64 316 | ;; 317 | 318 | x86_64 | x86-64 | x64 | amd64) 319 | _cputype=x86_64 320 | ;; 321 | 322 | mips) 323 | _cputype=$(get_endianness mips '' el) 324 | ;; 325 | 326 | mips64) 327 | if [ "$_bitness" -eq 64 ]; then 328 | # only n64 ABI is supported for now 329 | _ostype="${_ostype}abi64" 330 | _cputype=$(get_endianness mips64 '' el) 331 | fi 332 | ;; 333 | 334 | ppc) 335 | _cputype=powerpc 336 | ;; 337 | 338 | ppc64) 339 | _cputype=powerpc64 340 | ;; 341 | 342 | ppc64le) 343 | _cputype=powerpc64le 344 | ;; 345 | 346 | s390x) 347 | _cputype=s390x 348 | ;; 349 | riscv64) 350 | _cputype=riscv64gc 351 | ;; 352 | *) 353 | err "unknown CPU type: $_cputype" 354 | 355 | esac 356 | 357 | # Detect 64-bit linux with 32-bit userland 358 | if [ "${_ostype}" = unknown-linux-gnu ] && [ "${_bitness}" -eq 32 ]; then 359 | case $_cputype in 360 | x86_64) 361 | if [ -n "${RUSTUP_CPUTYPE:-}" ]; then 362 | _cputype="$RUSTUP_CPUTYPE" 363 | else { 364 | # 32-bit executable for amd64 = x32 365 | if is_host_amd64_elf; then { 366 | echo "This host is running an x32 userland; as it stands, x32 support is poor," 1>&2 367 | echo "and there isn't a native toolchain -- you will have to install" 1>&2 368 | echo "multiarch compatibility with i686 and/or amd64, then select one" 1>&2 369 | echo "by re-running this script with the RUSTUP_CPUTYPE environment variable" 1>&2 370 | echo "set to i686 or x86_64, respectively." 1>&2 371 | echo 1>&2 372 | echo "You will be able to add an x32 target after installation by running" 1>&2 373 | echo " rustup target add x86_64-unknown-linux-gnux32" 1>&2 374 | exit 1 375 | }; else 376 | _cputype=i686 377 | fi 378 | }; fi 379 | ;; 380 | mips64) 381 | _cputype=$(get_endianness mips '' el) 382 | ;; 383 | powerpc64) 384 | _cputype=powerpc 385 | ;; 386 | aarch64) 387 | _cputype=armv7 388 | if [ "$_ostype" = "linux-android" ]; then 389 | _ostype=linux-androideabi 390 | else 391 | _ostype="${_ostype}eabihf" 392 | fi 393 | ;; 394 | riscv64gc) 395 | err "riscv64 with 32-bit userland unsupported" 396 | ;; 397 | esac 398 | fi 399 | 400 | # Detect armv7 but without the CPU features Rust needs in that build, 401 | # and fall back to arm. 402 | # See https://github.com/rust-lang/rustup.rs/issues/587. 403 | if [ "$_ostype" = "unknown-linux-gnueabihf" ] && [ "$_cputype" = armv7 ]; then 404 | if ensure grep '^Features' /proc/cpuinfo | grep -q -v neon; then 405 | # At least one processor does not have NEON. 406 | _cputype=arm 407 | fi 408 | fi 409 | 410 | _arch="${_cputype}-${_ostype}" 411 | 412 | RETVAL="$_arch" 413 | } 414 | 415 | say() { 416 | printf 'rustup: %s\n' "$1" 417 | } 418 | 419 | err() { 420 | say "$1" >&2 421 | exit 1 422 | } 423 | 424 | need_cmd() { 425 | if ! check_cmd "$1"; then 426 | err "need '$1' (command not found)" 427 | fi 428 | } 429 | 430 | check_cmd() { 431 | command -v "$1" > /dev/null 2>&1 432 | } 433 | 434 | assert_nz() { 435 | if [ -z "$1" ]; then err "assert_nz $2"; fi 436 | } 437 | 438 | # Run a command that should never fail. If the command fails execution 439 | # will immediately terminate with an error showing the failing 440 | # command. 441 | ensure() { 442 | if ! "$@"; then err "command failed: $*"; fi 443 | } 444 | 445 | # This is just for indicating that commands' results are being 446 | # intentionally ignored. Usually, because it's being executed 447 | # as part of error handling. 448 | ignore() { 449 | "$@" 450 | } 451 | 452 | # This wraps curl or wget. Try curl first, if not installed, 453 | # use wget instead. 454 | downloader() { 455 | local _dld 456 | local _ciphersuites 457 | local _err 458 | local _status 459 | if check_cmd curl; then 460 | _dld=curl 461 | elif check_cmd wget; then 462 | _dld=wget 463 | else 464 | _dld='curl or wget' # to be used in error message of need_cmd 465 | fi 466 | 467 | if [ "$1" = --check ]; then 468 | need_cmd "$_dld" 469 | elif [ "$_dld" = curl ]; then 470 | get_ciphersuites_for_curl 471 | _ciphersuites="$RETVAL" 472 | if [ -n "$_ciphersuites" ]; then 473 | _err=$(curl --proto '=https' --tlsv1.2 --ciphers "$_ciphersuites" --silent --show-error --fail --location "$1" --output "$2" 2>&1) 474 | _status=$? 475 | else 476 | echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure" 477 | if ! check_help_for "$3" curl --proto --tlsv1.2; then 478 | echo "Warning: Not enforcing TLS v1.2, this is potentially less secure" 479 | _err=$(curl --silent --show-error --fail --location "$1" --output "$2" 2>&1) 480 | _status=$? 481 | else 482 | _err=$(curl --proto '=https' --tlsv1.2 --silent --show-error --fail --location "$1" --output "$2" 2>&1) 483 | _status=$? 484 | fi 485 | fi 486 | if [ -n "$_err" ]; then 487 | echo "$_err" >&2 488 | if echo "$_err" | grep -q 404$; then 489 | err "installer for platform '$3' not found, this may be unsupported" 490 | fi 491 | fi 492 | return $_status 493 | elif [ "$_dld" = wget ]; then 494 | get_ciphersuites_for_wget 495 | _ciphersuites="$RETVAL" 496 | if [ -n "$_ciphersuites" ]; then 497 | _err=$(wget --https-only --secure-protocol=TLSv1_2 --ciphers "$_ciphersuites" "$1" -O "$2" 2>&1) 498 | _status=$? 499 | else 500 | echo "Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure" 501 | if ! check_help_for "$3" wget --https-only --secure-protocol; then 502 | echo "Warning: Not enforcing TLS v1.2, this is potentially less secure" 503 | _err=$(wget "$1" -O "$2" 2>&1) 504 | _status=$? 505 | else 506 | _err=$(wget --https-only --secure-protocol=TLSv1_2 "$1" -O "$2" 2>&1) 507 | _status=$? 508 | fi 509 | fi 510 | if [ -n "$_err" ]; then 511 | echo "$_err" >&2 512 | if echo "$_err" | grep -q ' 404 Not Found$'; then 513 | err "installer for platform '$3' not found, this may be unsupported" 514 | fi 515 | fi 516 | return $_status 517 | else 518 | err "Unknown downloader" # should not reach here 519 | fi 520 | } 521 | 522 | check_help_for() { 523 | local _arch 524 | local _cmd 525 | local _arg 526 | _arch="$1" 527 | shift 528 | _cmd="$1" 529 | shift 530 | 531 | local _category 532 | if "$_cmd" --help | grep -q 'For all options use the manual or "--help all".'; then 533 | _category="all" 534 | else 535 | _category="" 536 | fi 537 | 538 | case "$_arch" in 539 | 540 | *darwin*) 541 | if check_cmd sw_vers; then 542 | case $(sw_vers -productVersion) in 543 | 10.*) 544 | # If we're running on macOS, older than 10.13, then we always 545 | # fail to find these options to force fallback 546 | if [ "$(sw_vers -productVersion | cut -d. -f2)" -lt 13 ]; then 547 | # Older than 10.13 548 | echo "Warning: Detected macOS platform older than 10.13" 549 | return 1 550 | fi 551 | ;; 552 | 11.*) 553 | # We assume Big Sur will be OK for now 554 | ;; 555 | *) 556 | # Unknown product version, warn and continue 557 | echo "Warning: Detected unknown macOS major version: $(sw_vers -productVersion)" 558 | echo "Warning TLS capabilities detection may fail" 559 | ;; 560 | esac 561 | fi 562 | ;; 563 | 564 | esac 565 | 566 | for _arg in "$@"; do 567 | if ! "$_cmd" --help $_category | grep -q -- "$_arg"; then 568 | return 1 569 | fi 570 | done 571 | 572 | true # not strictly needed 573 | } 574 | 575 | # Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites 576 | # if support by local tools is detected. Detection currently supports these curl backends: 577 | # GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty. 578 | get_ciphersuites_for_curl() { 579 | if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then 580 | # user specified custom cipher suites, assume they know what they're doing 581 | RETVAL="$RUSTUP_TLS_CIPHERSUITES" 582 | return 583 | fi 584 | 585 | local _openssl_syntax="no" 586 | local _gnutls_syntax="no" 587 | local _backend_supported="yes" 588 | if curl -V | grep -q ' OpenSSL/'; then 589 | _openssl_syntax="yes" 590 | elif curl -V | grep -iq ' LibreSSL/'; then 591 | _openssl_syntax="yes" 592 | elif curl -V | grep -iq ' BoringSSL/'; then 593 | _openssl_syntax="yes" 594 | elif curl -V | grep -iq ' GnuTLS/'; then 595 | _gnutls_syntax="yes" 596 | else 597 | _backend_supported="no" 598 | fi 599 | 600 | local _args_supported="no" 601 | if [ "$_backend_supported" = "yes" ]; then 602 | # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. 603 | if check_help_for "notspecified" "curl" "--tlsv1.2" "--ciphers" "--proto"; then 604 | _args_supported="yes" 605 | fi 606 | fi 607 | 608 | local _cs="" 609 | if [ "$_args_supported" = "yes" ]; then 610 | if [ "$_openssl_syntax" = "yes" ]; then 611 | _cs=$(get_strong_ciphersuites_for "openssl") 612 | elif [ "$_gnutls_syntax" = "yes" ]; then 613 | _cs=$(get_strong_ciphersuites_for "gnutls") 614 | fi 615 | fi 616 | 617 | RETVAL="$_cs" 618 | } 619 | 620 | # Return cipher suite string specified by user, otherwise return strong TLS 1.2-1.3 cipher suites 621 | # if support by local tools is detected. Detection currently supports these wget backends: 622 | # GnuTLS and OpenSSL (possibly also LibreSSL and BoringSSL). Return value can be empty. 623 | get_ciphersuites_for_wget() { 624 | if [ -n "${RUSTUP_TLS_CIPHERSUITES-}" ]; then 625 | # user specified custom cipher suites, assume they know what they're doing 626 | RETVAL="$RUSTUP_TLS_CIPHERSUITES" 627 | return 628 | fi 629 | 630 | local _cs="" 631 | if wget -V | grep -q '\-DHAVE_LIBSSL'; then 632 | # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. 633 | if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then 634 | _cs=$(get_strong_ciphersuites_for "openssl") 635 | fi 636 | elif wget -V | grep -q '\-DHAVE_LIBGNUTLS'; then 637 | # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc. 638 | if check_help_for "notspecified" "wget" "TLSv1_2" "--ciphers" "--https-only" "--secure-protocol"; then 639 | _cs=$(get_strong_ciphersuites_for "gnutls") 640 | fi 641 | fi 642 | 643 | RETVAL="$_cs" 644 | } 645 | 646 | # Return strong TLS 1.2-1.3 cipher suites in OpenSSL or GnuTLS syntax. TLS 1.2 647 | # excludes non-ECDHE and non-AEAD cipher suites. DHE is excluded due to bad 648 | # DH params often found on servers (see RFC 7919). Sequence matches or is 649 | # similar to Firefox 68 ESR with weak cipher suites disabled via about:config. 650 | # $1 must be openssl or gnutls. 651 | get_strong_ciphersuites_for() { 652 | if [ "$1" = "openssl" ]; then 653 | # OpenSSL is forgiving of unknown values, no problems with TLS 1.3 values on versions that don't support it yet. 654 | echo "TLS_AES_128_GCM_SHA256:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384" 655 | elif [ "$1" = "gnutls" ]; then 656 | # GnuTLS isn't forgiving of unknown values, so this may require a GnuTLS version that supports TLS 1.3 even if wget doesn't. 657 | # Begin with SECURE128 (and higher) then remove/add to build cipher suites. Produces same 9 cipher suites as OpenSSL but in slightly different order. 658 | echo "SECURE128:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1:-VERS-DTLS-ALL:-CIPHER-ALL:-MAC-ALL:-KX-ALL:+AEAD:+ECDHE-ECDSA:+ECDHE-RSA:+AES-128-GCM:+CHACHA20-POLY1305:+AES-256-GCM" 659 | fi 660 | } 661 | 662 | main "$@" || exit 1 663 | -------------------------------------------------------------------------------- /test_build.R: -------------------------------------------------------------------------------- 1 | # Loosely based on http://www.kdnuggets.com/2015/06/top-20-r-packages.html 2 | 3 | Library <- function(libname){ 4 | print(libname) 5 | suppressPackageStartupMessages(library(libname, character.only=TRUE)) 6 | } 7 | 8 | Library("animation") 9 | Library("bigrquery") 10 | Library("bitops") 11 | Library("colorspace") 12 | Library("devtools") 13 | Library("dichromat") 14 | Library("digest") 15 | Library("dplyr") 16 | Library("dtwclust") 17 | Library("fable") 18 | Library("gapminder") 19 | Library("ggplot2") 20 | Library("gtable") 21 | Library("hrbrthemes") 22 | Library("imager") 23 | Library("IRkernel") 24 | Library("jsonlite") 25 | Library("keras") 26 | Library("knitr") 27 | Library("labeling") 28 | Library("leaflet") 29 | Library("magick") 30 | Library("mime") 31 | Library("munsell") 32 | Library("plyr") 33 | Library("proto") 34 | Library("randomForest") 35 | Library("ranger") 36 | Library("RColorBrewer") 37 | Library("Rcpp") 38 | Library("RCurl") 39 | Library("readr") 40 | Library("reshape2") 41 | Library("roxygen2") 42 | Library("Rtsne") 43 | Library("scales") 44 | Library("seewave") 45 | Library("sf") 46 | Library("stringr") 47 | Library("terra") 48 | Library("tfhub") 49 | Library("tidyr") 50 | Library("tidymodels") 51 | Library("timereg") 52 | Library("udunits2") 53 | Library("xgboost") 54 | Library("zoo") 55 | 56 | #Packages for Neurohacking in R coursera course 57 | Library("oro.nifti") 58 | Library("oro.dicom") 59 | # b/232137539 fslr is installed in rstats. 60 | 61 | testPlot1 <- ggplot(data.frame(x=1:10,y=runif(10))) + aes(x=x,y=y) + geom_line() 62 | ggsave(testPlot1, filename="plot1.png") 63 | -------------------------------------------------------------------------------- /utils.R: -------------------------------------------------------------------------------- 1 | # Based on private methods found in utils package 2 | # https://github.com/wch/r-source/blob/05bfe40425384c06ac179f64cd1060f04088064a/src/library/utils/R/packages.R#L1103 3 | 4 | clean_up_dependencies <- function(x) 5 | { 6 | ## x is a character vector of Depends / Suggests / Imports entries 7 | ## returns a character vector of all the package dependencies mentioned 8 | x <- x[!is.na(x)] 9 | if(!length(x)) return(x) 10 | x <- unlist(strsplit(x, ",", fixed = TRUE), use.names = FALSE) 11 | unique(sub("^[[:space:]]*([[:alnum:].]+).*$", "\\1" , x)) 12 | } 13 | 14 | make_dependency_list <- function(pkgs, available) 15 | { 16 | ## given a character vector of packages, 17 | ## return a named list of character vectors of their dependencies. 18 | entries <- c("Depends", "Imports", "LinkingTo") 19 | 20 | if(!length(pkgs)) return(NULL) 21 | if(is.null(available)) 22 | stop(gettextf("%s must be supplied", sQuote("available")), domain = NA) 23 | 24 | dependencies <- vector("list", length(pkgs)); names(dependencies) <- pkgs 25 | 26 | known_packages <- row.names(available) 27 | info <- available[, entries, drop = FALSE] 28 | 29 | known_packages_with_dep <- vector("list", length(known_packages)); names(known_packages_with_dep) <- known_packages 30 | for (i in seq_along(known_packages)) 31 | known_packages_with_dep[[i]] <- clean_up_dependencies(info[i, ]) 32 | 33 | # Dependency Discovery, find the dependencies of the dependencies 34 | for (pkg in pkgs) { 35 | p <- known_packages_with_dep[[pkg]] 36 | p <- p[p %in% known_packages]; p1 <- p 37 | repeat { 38 | extra <- unlist(known_packages_with_dep[p1]) 39 | extra <- extra[extra != pkg] 40 | extra <- extra[extra %in% known_packages] 41 | deps <- unique(c(p, extra)) 42 | if (length(deps) <= length(p)) break 43 | p1 <- deps[!deps %in% p] 44 | p <- deps 45 | } 46 | dependencies[[pkg]] <- p 47 | } 48 | 49 | dependencies 50 | } 51 | --------------------------------------------------------------------------------