Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
$dir = $env:TEMP;
Set-Location $dir
$urlRStudio = ""
$outputRStudio = "$dir\RStudio.exe"
$wcRStudio = New-Object System.Net.WebClient
$wcRStudio.DownloadFile($urlRStudio, $outputRStudio) # $PSScriptRoot
$urlR = ""
$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
You can’t perform that action at this time.