Last active
November 5, 2024 23:32
-
-
Save stevecondylios/477fba43bce461bfb1e11b2a4019b39d to your computer and use it in GitHub Desktop.
Powershell script to install both R and RStudio on Windows. NOTE: there are a couple of links in the script below - update them to ensure you install most recent versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$dir = $env:TEMP; | |
Set-Location $dir | |
$urlRStudio = "https://download1.rstudio.org/desktop/windows/RStudio-1.2.1335.exe" | |
$outputRStudio = "$dir\RStudio.exe" | |
$wcRStudio = New-Object System.Net.WebClient | |
$wcRStudio.DownloadFile($urlRStudio, $outputRStudio) # $PSScriptRoot | |
$urlR = "https://cran.r-project.org/bin/windows/base/R-3.6.0-win.exe" | |
$outputR = "$dir\R-win.exe" | |
$wcR = New-Object System.Net.WebClient | |
$wcR.DownloadFile($urlR, $outputR) | |
$dirRStudio = $dir + "\RStudio.exe" | |
$dirR = $dir + "\R-win.exe" | |
Start-Process -FilePath $dirRStudio -ArgumentList "/S /v/qn" | |
Start-Process -FilePath $dirR -ArgumentList "/S /v/qn" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment