Skip to content

Commit 6b92819

Browse files
committed
Update R/RStudio class type for freshness
1 parent 180da8e commit 6b92819

File tree

1 file changed

+61
-36
lines changed

1 file changed

+61
-36
lines changed

articles/lab-services/class-type-rstudio-windows.md

Lines changed: 61 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
---
2-
title: Set up a lab with R and RStudio on Windows using Azure Lab Services
3-
description: Learn how to set up labs to teach R using RStudio on Windows
4-
ms.topic: how-to
5-
ms.date: 08/26/2021
2+
title: Set up RStudio lab on Windows
3+
titleSuffix: Azure Lab Services
4+
description: Learn how to set up a lab in Azure Lab Services to teach R using RStudio on Windows.
5+
services: lab-services
66
ms.service: lab-services
7+
author: ntrogh
8+
ms.author: nicktrog
9+
ms.topic: how-to
10+
ms.date: 04/24/2023
711
---
812

9-
# Set up a lab to teach R on Windows
13+
# Set up a lab to teach R on Windows with Azure Lab Services
1014

1115
[!INCLUDE [preview note](./includes/lab-services-new-update-focused-article.md)]
1216

13-
[R](https://www.r-project.org/about.html) is an open-source language used for statistical computing and graphics. It's used in the statistical analysis of genetics to natural language processing to analyzing financial data. R provides an [interactive command line](https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Invoking-R-from-the-command-line) experience. [RStudio](https://www.rstudio.com/products/rstudio/) is an interactive development environment (IDE) available for the R language. The free version provides code-editing tools, an integrated debugging experience, and package development tools.
17+
This article shows you how to set up a class in Azure Lab Services for teaching R and RStudio.
1418

15-
This article will focus on solely RStudio and R as a building block for a class that requires the use of statistical computing. The [deep learning](class-type-deep-learning-natural-language-processing.md) and [Python and Jupyter Notebooks](class-type-jupyter-notebook.md)
16-
class types set up RStudio differently. Each article describes how to use the [Data Science Virtual Machine for Linux (Ubuntu)](https://azuremarketplace.microsoft.com/en-us/marketplace/apps?search=Data%20science%20Virtual%20machine&page=1&filters=microsoft%3Blinux) marketplace image, which has many [data science related tools](../machine-learning/data-science-virtual-machine/tools-included.md), including RStudio, pre-installed.
19+
[R](https://www.r-project.org/about.html) is an open-source language used for statistical computing and graphics. The R language is used in the statistical analysis of genetics to natural language processing to analyzing financial data. R provides an [interactive command line](https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Invoking-R-from-the-command-line) experience. [RStudio](https://www.rstudio.com/products/rstudio/) is an interactive development environment (IDE) available for the R language. The free version provides code-editing tools, an integrated debugging experience, and package development tools.
20+
21+
This article focuses on using R and RStudio for statistical computing. The [deep learning] (class-type-deep-learning-natural-language-processing.md) and [Python and Jupyter Notebooks](class-type-jupyter-notebook.md)
22+
class types set up RStudio differently. Each article describes how to use the [Data Science Virtual Machine for Linux (Ubuntu)](https://azuremarketplace.microsoft.com/en-us/marketplace/apps?search=Data%20science%20Virtual%20machine&page=1&filters=microsoft%3Blinux) marketplace image, which has many [data science related tools](../machine-learning/data-science-virtual-machine/tools-included.md), including RStudio, pre-installed.
1723

18-
## Lab configuration
1924

20-
To set up this lab, you need an Azure subscription and lab plan to get started. If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
25+
## Prerequisites
26+
27+
[!INCLUDE [must have subscription](./includes/lab-services-class-type-subscription.md)]
28+
29+
## Lab configuration
2130

2231
### External resource configuration
2332

@@ -32,36 +41,46 @@ If you choose to use any external resources, you’ll need to [Connect to your v
3241
3342
### Lab plan settings
3443

35-
Once you get have Azure subscription, you can create a new lab plan in Azure Lab Services. For more information about creating a new lab plan, see the tutorial on [how to set up a lab plan](./quick-create-resources.md). You can also use an existing lab plan.
44+
[!INCLUDE [must have lab plan](./includes/lab-services-class-type-lab-plan.md)]
3645

3746
### Lab settings
3847

3948
For instructions on how to create a lab, see [Tutorial: Set up a lab](tutorial-setup-lab.md). Use the following settings when creating the lab.
4049

4150
| Lab setting | Value and description |
4251
| ------------ | ------------------ |
43-
| Virtual Machine Size | Small GPU (Compute)|
44-
| VM image | Windows 10 Pro. Version 2004 |
52+
| Virtual Machine Size | **Small GPU (Compute)** |
53+
| VM image | **Windows 10 Pro** |
4554

4655
## Template configuration
56+
After the template virtual machine is created, perform the following steps to configure the lab:
57+
58+
1. Start the template virtual machine and connect to the machine using RDP.
4759

48-
After the template machine is created, start the machine, and connect to it to [install R](https://docs.rstudio.com/resources/install-r/) and [RStudio Desktop](https://www.rstudio.com/products/rstudio/download/).
60+
1. [Install R](https://docs.rstudio.com/resources/install-r/) in the template VM
61+
62+
1. [Install RStudio](https://www.rstudio.com/products/rstudio/download/) in the template VM
4963

5064
### Install R
65+
To install R in the template virtual machine:
66+
67+
1. Download the [latest installer for R for Windows](https://cran.r-project.org/bin/windows/base/release.html).
68+
69+
For a full list of versions available, see the [R for Windows download page](https://cran.r-project.org/bin/windows/base/).
5170

52-
1. Download the [latest installer for R for Windows](https://cran.r-project.org/bin/windows/base/release.html). For a full list of versions available, see the [R for Windows download page](https://cran.r-project.org/bin/windows/base/).
5371
2. Run the installer.
72+
5473
1. For the **Select Setup Language** prompt, choose the language you want and select **OK**
55-
2. On the **Information** page of the installer, read the license agreement. Select **Next** to accept agreement and continue on.
56-
3. On the **Select Destination Location** page, accept the default install location and select **Next**.
57-
4. On the **Select Components** page, optionally uncheck **32-bit files** option. For more information about running both 32-bit and 62-bit versions of R, see [Can both 32-bit and 64-bit R be installed on the same machine?](https://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-both-32_002d-and-64_002dbit-R-be-installed-on-the-same-machine_003f) frequently asked question.
58-
5. On the **Startup options** page, leave startup options as **No (accept defaults)**. If you want the R graphical user interface (GUI) to use separate windows (SDI) or plain text help, choose **Yes (customize startup)** radio button and change startup options in the following to pages of the wizard.
59-
6. On the **Select Start Menu Folder** page, select **Next**.
60-
7. On the **Select Additional Tasks** page, optionally select **Create a desktop shortcut**. Select **Next**.
61-
8. On the **Installing** page, wait for the installation to finish.
62-
9. On the **Completing the R for Windows** page, select **Finish**.
74+
1. On the **Information** page of the installer, read the license agreement. Select **Next** to accept agreement and continue on.
75+
1. On the **Select Destination Location** page, accept the default install location and select **Next**.
76+
1. On the **Select Components** page, optionally uncheck **32-bit files** option. For more information about running both 32-bit and 62-bit versions of R, see [Can both 32-bit and 64-bit R be installed on the same machine?](https://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-both-32_002d-and-64_002dbit-R-be-installed-on-the-same-machine_003f) frequently asked question.
77+
1. On the **Startup options** page, leave startup options as **No (accept defaults)**. If you want the R graphical user interface (GUI) to use separate windows (SDI) or plain text help, choose **Yes (customize startup)** radio button and change startup options in the following to pages of the wizard.
78+
1. On the **Select Start Menu Folder** page, select **Next**.
79+
1. On the **Select Additional Tasks** page, optionally select **Create a desktop shortcut**. Select **Next**.
80+
1. On the **Installing** page, wait for the installation to finish.
81+
1. On the **Completing the R for Windows** page, select **Finish**.
6382

64-
You can also execute the installation of R using PowerShell. The code example shows how to install R without the 32-bit component and adds a desktop icon for the latest version of R. To see a full list of command-line options for the installer, see [setup command-line parameters](https://jrsoftware.org/ishelp/index.php?topic=setupcmdline).
83+
You can also perform the installation of R by using PowerShell. The following code example shows how to install R without the 32-bit component and adds a desktop icon for the latest version of R. To see a full list of command-line options for the installer, see [setup command-line parameters](https://jrsoftware.org/ishelp/index.php?topic=setupcmdline).
6584

6685
```powershell
6786
#Avoid prompt to setup Internet Explorer if we must parse download page
@@ -92,17 +111,19 @@ Start-Process -FilePath $installPath.FullName -ArgumentList "/VERYSILENT /LOG=r-
92111

93112
### Install RStudio
94113

95-
Now that we have R installed locally, we can install the RStudio IDE. We'll install the free version of RStudio Desktop. For all available versions, see [RStudio downloads](https://www.rstudio.com/products/rstudio/download/).
114+
After you install R in the template VM, install the RStudio IDE. In this article, you install the free version of RStudio Desktop. For all available versions, see [RStudio downloads](https://www.rstudio.com/products/rstudio/download/).
115+
116+
1. Download the [installer for R Studio](https://www.rstudio.com/products/rstudio/download/#download) for Windows 10. The installer file is in the format `rstudio-{version}.exe`.
117+
118+
1. Run the RStudio installer.
96119

97-
1. Download the [installer for R Studio](https://www.rstudio.com/products/rstudio/download/#download) for Windows 10. The installer file will be in the format `rstudio-{version}.exe`.
98-
2. Run the RStudio installer.
99120
1. On the **Welcome to RStudio Setup** page of the **RStudio Setup** wizard, select **Next**.
100-
2. On the **Choose Install Location** page, select **Next**.
101-
3. On the **Choose Start Menu Folder** page, select **Install**.
102-
4. On the **Installing** page, wait for the installation to finish.
103-
5. On the **Completing RStudio Setup** page, select **Finish**.
121+
1. On the **Choose Install Location** page, select **Next**.
122+
1. On the **Choose Start Menu Folder** page, select **Install**.
123+
1. On the **Installing** page, wait for the installation to finish.
124+
1. On the **Completing RStudio Setup** page, select **Finish**.
104125

105-
To execute the RStudio installation steps using PowerShell, run the following commands. See [RStudio downloads](https://www.rstudio.com/products/rstudio/download/) to verify the RStudio version is available before executing the commands.
126+
To perform the RStudio installation steps by using PowerShell, run the following commands. See [RStudio downloads](https://www.rstudio.com/products/rstudio/download/) to verify the RStudio version is available before executing the commands.
106127

107128
```powershell
108129
$rstudiover="1.4.1717"
@@ -118,15 +139,19 @@ Start-Process -FilePath $installPath.FullName -ArgumentList "/S" -NoNewWindow -W
118139

119140
### CRAN packages
120141

121-
Use the `install.packages(“package name”)` command in an R interactive session as shown in [quick list of useful R packages](https://support.rstudio.com/hc/articles/201057987-Quick-list-of-useful-R-packages) article. Alternately, use Tools -> Install Packages menu item in RStudio.
142+
To install CRAN packages:
143+
144+
- Use the `install.packages(“package name”)` command in an R interactive session as shown in [quick list of useful R packages](https://support.rstudio.com/hc/articles/201057987-Quick-list-of-useful-R-packages) article.
145+
146+
- Alternately, use the **Tools** > **Install Packages** menu item in RStudio.
122147

123-
If you need help with finding a package, see a [list of packages by task](https://cran.r-project.org/web/views/) or [alphabetic list of packages](https://cloud.r-project.org/web/packages/available_packages_by_name.html).
148+
See the [list of packages by task](https://cran.r-project.org/web/views/) or [alphabetic list of packages](https://cloud.r-project.org/web/packages/available_packages_by_name.html).
124149

125150
## Cost
126151

127-
Let’s cover an example cost estimate for this class. Suppose you have a class of 25 students. Each student has 20 hours of scheduled class time. Another 10 quota hours for homework or assignments outside of scheduled class time is given to each student. The virtual machine size we chose was **Small GPU (Compute)**, which is 139 lab units.
152+
This section provides a cost estimate for running this class for 25 users. There are 20 hours of scheduled class time. Also, each user gets 10 hours quota for homework or assignments outside scheduled class time. The virtual machine size we chose was **Small GPU (Compute)**, which is 139 lab units.
128153

129-
25 students × (20 scheduled hours + 10 quota hours) × 139 Lab Units × 0.01 USD per hour = 1042.5 USD
154+
- 25 students × (20 scheduled hours + 10 quota hours) × 139 lab units
130155

131156
> [!IMPORTANT]
132157
> The cost estimate is for example purposes only. For current pricing information, see [Azure Lab Services pricing](https://azure.microsoft.com/pricing/details/lab-services/).

0 commit comments

Comments
 (0)