# How to create RStudio Cloud account and installing all the packages

{% hint style="warning" %}
Students **cannot** continue this class without getting full credit from this assignment (unlimited attempts).
{% endhint %}

{% hint style="info" %}
This class will teach you how to use RStudio. You will be able to use this software on your browser.

You need to have a RStudio (Posit) Cloud account. The new name of RStudio Cloud is Posit. We will use the name of RStudio Cloud and Posit interchangeably.
{% endhint %}

{% hint style="success" %}
Lab lectures are listed in the syllabus (Table 3: Course schedule), with topics beginning with “RStudio.”
{% endhint %}

## Assignment video <a href="#assignment-video" id="assignment-video"></a>

The video below shows how to complete this assignment from start to finish.

> **Do not** submit this assignment <mark style="color:red;">without</mark> watching the video and read the instructions together.

{% embed url="<https://drive.google.com/file/d/1qS2xGpy1h04ojoOoFLOrW8rehxsr6cUL/view?usp=drive_link>" %}

## Assignment instructions

{% stepper %}
{% step %}

### RStudio website

1. Go to <https://posit.cloud/plans/free> and make sure you choose “free.”
2. Click "Sign up."

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FifG8QW7JQUVxl0FFXazu%2FSCR-20251216-lzmf-2.png?alt=media&#x26;token=e5df876b-1dfe-4147-8e18-ab11039f5d6c" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### School email address and a new password

1. Use your school email address.
2. Put a password (at least 10 characters). You will share your password with me, so note it somewhere down. As you see I will have access to your password. That's why you should not use this password somewhere else. You must:
   1. Use upper and lower case letters
   2. Use numbers
   3. Use special characters

{% hint style="success" %}
I recommend [Bitward Free Password Generator](https://bitwarden.com/password-generator/#password-generator).
{% endhint %}

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FqgIzTPCW0NhyLUsVJAIH%2Fimage.png?alt=media&#x26;token=62720838-b6d9-46c8-9ff8-d6991e902463" alt=""><figcaption></figcaption></figure>

3. **DO NOT** use “Sign up with Google." Not now, not during the semester.
4. Click "Sign up."

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2Fz3Km9z6BUSPoxFAUYPzk%2FSCR-20251216-mayi-2.png?alt=media&#x26;token=f0fba623-ea6d-4afb-9fd7-9f5c5f3b5a6f" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Verification

1. Go to your school email inbox and click “Verify.”
2. You will be directed to [https://posit.cloud](https://posit.cloud/plans/free). If not, click on the link.
   {% endstep %}

{% step %}

### New project (RStudio labs)

1. Click "New Project."
2. Choose "New RStudio Project."&#x20;
   1. You will wait 10-15 second while RStudio deploys the project. If it takes longer, refresh your page.
3. On the new screen, click on “Untitled Project” and type “RStudio labs”.

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FI1tlZ7Z80wOHbbnI39Z4%2FSCR-20251216-mhat.png?alt=media&#x26;token=2b2cbabc-0727-46f8-a546-1c6705d1ee08" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note: In previous semesters, many students mistakenly created a separate project for each lab. **This is incorrect.** You will not create a new project for each lab. Instead, you will always work within the existing 'RStudio labs' project throughout the course.
{% endhint %}

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FMEugYApmt9wPVBguG9nx%2Fimage.png?alt=media&#x26;token=3e686ce5-3ed1-4568-8a2e-8b8b5d29aed2" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Download the specific R script file for this assignment

1. [**Click here and download script\_installing packages.R**](https://drive.google.com/open?id=1dSgvAslE39sRxC_E08aHIffPipT9um8U\&usp=drive_fs)
2. **Do not** click on this file. You will upload it to RStudio in the next step.

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2F9IIqSNfDkJa3JzNyQeVm%2FSCR-20251216-nfru-2.png?alt=media&#x26;token=1cf0ef99-fa5a-49c0-bb34-91457ec4afda" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Upload that R script file to RStudio

1. Click "Upload" on RStudio.
2. Click "Choose file." Find the R script file you just downloaded (script\_installing packages.R) in the previous step and click “Open.”

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FpZlwl3qkDvl9ivYaOhQ9%2FSCR-20251216-mnhh-2.png?alt=media&#x26;token=1ff6252f-a66b-4268-a19d-268425001fe3" alt="A screenshot of the RStudio interface showing the Upload Files dialog open. The dialog displays the target directory /cloud/project, with a red callout highlighting the Choose File button and another highlighting the Upload button in the Files pane, indicating how to upload files into an RStudio cloud project."><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Install and load packages

1. After completing the previous step, you will see "script\_installing packages.R" under "Files."
   1. Click on "script\_installing packages.R."
2. As soon as you click on "script\_installing packages.R," you will see the content of this file on the left side.
   1. Highlight all the lines under the “Install and load packages.”
3. Click "Run."

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FgkXXphGHIboEecVHwnah%2FSCR-20251216-mpjj-2.png?alt=media&#x26;token=1b3ab766-f12b-42d1-a138-325c0f829aaa" alt="A screenshot of the RStudio interface demonstrating how to install packages. The Files pane highlights a script named script_installing packages.R (labeled 1). In the Source pane, a block of code for installing and loading packages is highlighted in red (labeled 2). A large red circle emphasizes the Run button at the top of the Source pane (labeled 3), indicating that the user should select the highlighted code and click Run to execute it."><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Wait

This process will install all the packages we’ll be using throughout the semester. This process may take <mark style="color:red;">**15-20 minutes**</mark> or shorter depending on your internet connection. This is a one-time process.&#x20;

You won't wait this long again during the semester.

1. You will see a <mark style="color:red;">STOP</mark> sign.
2. And, codes are running in the console. You should wait until the <mark style="color:red;">STOP</mark> sign in the console disappears and no more code is running in the console.
3. During this process, if you see the pop-up window above (Updating Loaded Packages), click “No” every single time.

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FoMo4RwuODTXuSoT5vwzM%2FSCR-20251216-muda-2.png?alt=media&#x26;token=c47e4f65-5b1d-4269-b048-edfe03fe1a18" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Load data

1. When the process above is completed, scroll down on the script file. Highlight all the lines under the “Load data.”
2. And, click "Run."
3. When the process above is completed, you should see “gss” and “key” under the “Environment” part.
4. Take a screenshot of this view as you will submit this view to Canvas.
   1. [\[Instructions: How to take a screenshot\]](https://ttezcan.gitbook.io/lectures/all-lectures-and-labs/guidelines-and-rubrics/how-to-take-a-screenshot)

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2FSsZy84paOG7pLThofOZs%2FSCR-20251216-mwtc-2.png?alt=media&#x26;token=125dd67b-d9da-40b0-844a-ca0059c0a85d" alt="A screenshot of the RStudio interface showing how to load data using an R script. In the Source pane, a block of code labeled “Load data” is highlighted in red (label 1). The Run button at the top of the Source pane is circled and pointed out (label 2), indicating how to execute the selected code. In the Environment pane on the right, two newly loaded objects—gss and key—are highlighted (label 3), confirming that the data were successfully loaded."><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Submission to Canvas

Click on "\[gr] RStudio lab assignment: Account and packages" under the "getting ready for the class" Module on Canvas.

There are two questions:

1. Paste your email address and the new password
2. Upload the screenshot showing your RStudio view with "gss" and "key." Your screenshot should look like the image above.

<figure><img src="https://1373704161-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFj6bxTviGJMBga1Kc5Yc%2Fuploads%2F7qnoYDMsUMMrBD4rLHyN%2Fimage.png?alt=media&#x26;token=a384cd3d-0cae-4aae-8227-6a51ae12d74b" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
