Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Liz #21

Open
wants to merge 23 commits into
base: dev
Choose a base branch
from
Open

Liz #21

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
102 changes: 102 additions & 0 deletions assignment_templates/assignment_2.rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
title: "Assignment 2"
author: "Your Name Here"
date: "`r format(Sys.time(), '%d %h, %Y, %I:%M %p')`"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Instructions:

1. Update your name in the header block, example: `author: "Alex Fout" `
1. Select `File > Save as` and save the file by adding your last name at the beginning with an underscore, example: `fout_assignment_2.rmd`
1. Follow the instructions below to fill in the assignment.
1. Be sure to _run your code chunks when you make them_, to make sure everything works!
1. When you've completed the assignment, __knit__ the document and make sure the resulting HTML or PDF file looks alright.
1. Upload the PDF or HTML file to Canvas (Don't upload the Rmd document).


# Assignment

In this assignment, we'll review R programming fundamentals.
Remember to place all code inside a code chunk.


## Problem 1.

Create an empty numeric vector of length 3 called `a`
Then assign the elements of a the values 5, 6, and 6, respectively.



## Problem 2.

Create a new numeric vector called `b` which is the result of squaring each element of `a`.
Then change the value of the second element of `b` so that it is the same as the first element of `b`.



## Problem 3.

Find the result of `a` times `b` and assign it to a new variable, `c`.
Then print out the sum of the elements of `c`.



## Problem 4.

Re-visit problems 1, 2, and 3, and add comments to your code explaining what the code does.


## Problem 5.

Change the third element of `b` to -2.
print out the values of `b` and `c`.
`c` was defined using `b`, did the value of `c` change?


## Problem 6.

create a new variable `d` which is the result of converting `a` into a character vector.
combine `a`, `b`, `c`, and `d` into a list called `letters`.


## Problem 7.

create a data frame from `letters` and call it `df`.
Change the column names of `df` to have names `a`, `b`, `c`, and `d`, respectively.
Then print out the dimension of `df`.


## Problem 9.

Create a logical vector by comparing which elements in `a` are equal to 6.


## Problem 10.

remove the `letters` variable from R.
Did this also remove `a`, `b`, `c`, and `d`?



## Problem 11.

Create a numeric vector called `two` which has elements 1 and 2.
Create a numeric vector called `four` which has four ones.
Normally you can't add vectors of different length, but let's try anyways.
Print the result of `two` plus `four`.
What did R do?




## End

This is the end of the assignment!
You can knit the document and upload it to Canvas


36 changes: 36 additions & 0 deletions assignment_templates/assignment_3.rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: "Assignment 3"
author: "Your Name Here"
date: "`r format(Sys.time(), '%d %h, %Y, %I:%M %p')`"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# Instructions:

1. Update your name in the header block, example: `author: "Alex Fout" `
1. Select `File > Save as` and save the file by adding your last name at the beginning with an underscore, example: `fout_assignment_3.rmd`
1. Follow the instructions below to fill in the assignment.
1. Be sure to _run your code chunks when you make them_, to make sure everything works!
1. When you've completed the assignment, __knit__ the document and make sure the resulting HTML or PDF file looks alright.
1. Upload the PDF or HTML file to Canvas (Don't upload the Rmd document).


# Assignment

In this assignment, we'll explore working with data in R.


## Problem 1.



## End

This is the end of the assignment!
You can knit the document and upload it to Canvas


Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 15 additions & 13 deletions docs/advanced-control-flow.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,23 @@
<li class="chapter" data-level="4.5" data-path="wrap-up.html"><a href="wrap-up.html"><i class="fa fa-check"></i><b>4.5</b> Wrap Up</a></li>
</ul></li>
<li class="chapter" data-level="5" data-path="working-with-data.html"><a href="working-with-data.html"><i class="fa fa-check"></i><b>5</b> Working with Data</a><ul>
<li class="chapter" data-level="5.1" data-path="loading-saving-data.html"><a href="loading-saving-data.html"><i class="fa fa-check"></i><b>5.1</b> Loading / Saving Data</a><ul>
<li class="chapter" data-level="5.1.1" data-path="loading-saving-data.html"><a href="loading-saving-data.html#taster-list-of-file-forms-and-sources"><i class="fa fa-check"></i><b>5.1.1</b> “Taster”(?) list of file forms and sources</a></li>
<li class="chapter" data-level="5.1.2" data-path="loading-saving-data.html"><a href="loading-saving-data.html#readingwriting-csv"><i class="fa fa-check"></i><b>5.1.2</b> reading/writing csv</a></li>
<li class="chapter" data-level="5.1.3" data-path="loading-saving-data.html"><a href="loading-saving-data.html#best-practices"><i class="fa fa-check"></i><b>5.1.3</b> Best practices</a></li>
<li class="chapter" data-level="5.1" data-path="quick-example.html"><a href="quick-example.html"><i class="fa fa-check"></i><b>5.1</b> Quick Example</a></li>
<li class="chapter" data-level="5.2" data-path="loading-saving-data.html"><a href="loading-saving-data.html"><i class="fa fa-check"></i><b>5.2</b> Loading / Saving Data</a><ul>
<li class="chapter" data-level="5.2.1" data-path="loading-saving-data.html"><a href="loading-saving-data.html#taster-list-of-file-forms-and-sources"><i class="fa fa-check"></i><b>5.2.1</b> “Taster”(?) list of file forms and sources</a></li>
<li class="chapter" data-level="5.2.2" data-path="loading-saving-data.html"><a href="loading-saving-data.html#data-format"><i class="fa fa-check"></i><b>5.2.2</b> Data Format</a></li>
<li class="chapter" data-level="5.2.3" data-path="loading-saving-data.html"><a href="loading-saving-data.html#readingwriting-csv"><i class="fa fa-check"></i><b>5.2.3</b> reading/writing csv</a></li>
<li class="chapter" data-level="5.2.4" data-path="loading-saving-data.html"><a href="loading-saving-data.html#best-practices"><i class="fa fa-check"></i><b>5.2.4</b> Best practices</a></li>
</ul></li>
<li class="chapter" data-level="5.2" data-path="downloading-and-saving.html"><a href="downloading-and-saving.html"><i class="fa fa-check"></i><b>5.2</b> Downloading and Saving</a></li>
<li class="chapter" data-level="5.3" data-path="working-with-data-1.html"><a href="working-with-data-1.html"><i class="fa fa-check"></i><b>5.3</b> Working With Data</a><ul>
<li class="chapter" data-level="5.3.1" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-indexing"><i class="fa fa-check"></i><b>5.3.1</b> Basic indexing</a></li>
<li class="chapter" data-level="5.3.2" data-path="working-with-data-1.html"><a href="working-with-data-1.html#advanced-indexing"><i class="fa fa-check"></i><b>5.3.2</b> Advanced indexing</a></li>
<li class="chapter" data-level="5.3.3" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors"><i class="fa fa-check"></i><b>5.3.3</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.3.4" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-matrices"><i class="fa fa-check"></i><b>5.3.4</b> Summarizing matrices</a></li>
<li class="chapter" data-level="5.3.5" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors-1"><i class="fa fa-check"></i><b>5.3.5</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.3.6" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-plotting"><i class="fa fa-check"></i><b>5.3.6</b> Basic Plotting</a></li>
<li class="chapter" data-level="5.3" data-path="downloading-and-saving.html"><a href="downloading-and-saving.html"><i class="fa fa-check"></i><b>5.3</b> Downloading and Saving</a></li>
<li class="chapter" data-level="5.4" data-path="working-with-data-1.html"><a href="working-with-data-1.html"><i class="fa fa-check"></i><b>5.4</b> Working With Data</a><ul>
<li class="chapter" data-level="5.4.1" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-indexing"><i class="fa fa-check"></i><b>5.4.1</b> Basic indexing</a></li>
<li class="chapter" data-level="5.4.2" data-path="working-with-data-1.html"><a href="working-with-data-1.html#advanced-indexing"><i class="fa fa-check"></i><b>5.4.2</b> Advanced indexing</a></li>
<li class="chapter" data-level="5.4.3" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors"><i class="fa fa-check"></i><b>5.4.3</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.4.4" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-matrices"><i class="fa fa-check"></i><b>5.4.4</b> Summarizing matrices</a></li>
<li class="chapter" data-level="5.4.5" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors-1"><i class="fa fa-check"></i><b>5.4.5</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.4.6" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-plotting"><i class="fa fa-check"></i><b>5.4.6</b> Basic Plotting</a></li>
</ul></li>
<li class="chapter" data-level="5.4" data-path="practice.html"><a href="practice.html"><i class="fa fa-check"></i><b>5.4</b> Practice</a></li>
<li class="chapter" data-level="5.5" data-path="practice.html"><a href="practice.html"><i class="fa fa-check"></i><b>5.5</b> Practice</a></li>
</ul></li>
<li class="chapter" data-level="6" data-path="performing-data-analysis.html"><a href="performing-data-analysis.html"><i class="fa fa-check"></i><b>6</b> Performing Data Analysis</a><ul>
<li class="chapter" data-level="6.1" data-path="basic-control-flow.html"><a href="basic-control-flow.html"><i class="fa fa-check"></i><b>6.1</b> Basic Control Flow</a></li>
Expand Down
28 changes: 15 additions & 13 deletions docs/assignment.html
Original file line number Diff line number Diff line change
Expand Up @@ -222,21 +222,23 @@
<li class="chapter" data-level="4.5" data-path="wrap-up.html"><a href="wrap-up.html"><i class="fa fa-check"></i><b>4.5</b> Wrap Up</a></li>
</ul></li>
<li class="chapter" data-level="5" data-path="working-with-data.html"><a href="working-with-data.html"><i class="fa fa-check"></i><b>5</b> Working with Data</a><ul>
<li class="chapter" data-level="5.1" data-path="loading-saving-data.html"><a href="loading-saving-data.html"><i class="fa fa-check"></i><b>5.1</b> Loading / Saving Data</a><ul>
<li class="chapter" data-level="5.1.1" data-path="loading-saving-data.html"><a href="loading-saving-data.html#taster-list-of-file-forms-and-sources"><i class="fa fa-check"></i><b>5.1.1</b> “Taster”(?) list of file forms and sources</a></li>
<li class="chapter" data-level="5.1.2" data-path="loading-saving-data.html"><a href="loading-saving-data.html#readingwriting-csv"><i class="fa fa-check"></i><b>5.1.2</b> reading/writing csv</a></li>
<li class="chapter" data-level="5.1.3" data-path="loading-saving-data.html"><a href="loading-saving-data.html#best-practices"><i class="fa fa-check"></i><b>5.1.3</b> Best practices</a></li>
<li class="chapter" data-level="5.1" data-path="quick-example.html"><a href="quick-example.html"><i class="fa fa-check"></i><b>5.1</b> Quick Example</a></li>
<li class="chapter" data-level="5.2" data-path="loading-saving-data.html"><a href="loading-saving-data.html"><i class="fa fa-check"></i><b>5.2</b> Loading / Saving Data</a><ul>
<li class="chapter" data-level="5.2.1" data-path="loading-saving-data.html"><a href="loading-saving-data.html#taster-list-of-file-forms-and-sources"><i class="fa fa-check"></i><b>5.2.1</b> “Taster”(?) list of file forms and sources</a></li>
<li class="chapter" data-level="5.2.2" data-path="loading-saving-data.html"><a href="loading-saving-data.html#data-format"><i class="fa fa-check"></i><b>5.2.2</b> Data Format</a></li>
<li class="chapter" data-level="5.2.3" data-path="loading-saving-data.html"><a href="loading-saving-data.html#readingwriting-csv"><i class="fa fa-check"></i><b>5.2.3</b> reading/writing csv</a></li>
<li class="chapter" data-level="5.2.4" data-path="loading-saving-data.html"><a href="loading-saving-data.html#best-practices"><i class="fa fa-check"></i><b>5.2.4</b> Best practices</a></li>
</ul></li>
<li class="chapter" data-level="5.2" data-path="downloading-and-saving.html"><a href="downloading-and-saving.html"><i class="fa fa-check"></i><b>5.2</b> Downloading and Saving</a></li>
<li class="chapter" data-level="5.3" data-path="working-with-data-1.html"><a href="working-with-data-1.html"><i class="fa fa-check"></i><b>5.3</b> Working With Data</a><ul>
<li class="chapter" data-level="5.3.1" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-indexing"><i class="fa fa-check"></i><b>5.3.1</b> Basic indexing</a></li>
<li class="chapter" data-level="5.3.2" data-path="working-with-data-1.html"><a href="working-with-data-1.html#advanced-indexing"><i class="fa fa-check"></i><b>5.3.2</b> Advanced indexing</a></li>
<li class="chapter" data-level="5.3.3" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors"><i class="fa fa-check"></i><b>5.3.3</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.3.4" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-matrices"><i class="fa fa-check"></i><b>5.3.4</b> Summarizing matrices</a></li>
<li class="chapter" data-level="5.3.5" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors-1"><i class="fa fa-check"></i><b>5.3.5</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.3.6" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-plotting"><i class="fa fa-check"></i><b>5.3.6</b> Basic Plotting</a></li>
<li class="chapter" data-level="5.3" data-path="downloading-and-saving.html"><a href="downloading-and-saving.html"><i class="fa fa-check"></i><b>5.3</b> Downloading and Saving</a></li>
<li class="chapter" data-level="5.4" data-path="working-with-data-1.html"><a href="working-with-data-1.html"><i class="fa fa-check"></i><b>5.4</b> Working With Data</a><ul>
<li class="chapter" data-level="5.4.1" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-indexing"><i class="fa fa-check"></i><b>5.4.1</b> Basic indexing</a></li>
<li class="chapter" data-level="5.4.2" data-path="working-with-data-1.html"><a href="working-with-data-1.html#advanced-indexing"><i class="fa fa-check"></i><b>5.4.2</b> Advanced indexing</a></li>
<li class="chapter" data-level="5.4.3" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors"><i class="fa fa-check"></i><b>5.4.3</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.4.4" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-matrices"><i class="fa fa-check"></i><b>5.4.4</b> Summarizing matrices</a></li>
<li class="chapter" data-level="5.4.5" data-path="working-with-data-1.html"><a href="working-with-data-1.html#summarizing-vectors-1"><i class="fa fa-check"></i><b>5.4.5</b> Summarizing vectors</a></li>
<li class="chapter" data-level="5.4.6" data-path="working-with-data-1.html"><a href="working-with-data-1.html#basic-plotting"><i class="fa fa-check"></i><b>5.4.6</b> Basic Plotting</a></li>
</ul></li>
<li class="chapter" data-level="5.4" data-path="practice.html"><a href="practice.html"><i class="fa fa-check"></i><b>5.4</b> Practice</a></li>
<li class="chapter" data-level="5.5" data-path="practice.html"><a href="practice.html"><i class="fa fa-check"></i><b>5.5</b> Practice</a></li>
</ul></li>
<li class="chapter" data-level="6" data-path="performing-data-analysis.html"><a href="performing-data-analysis.html"><i class="fa fa-check"></i><b>6</b> Performing Data Analysis</a><ul>
<li class="chapter" data-level="6.1" data-path="basic-control-flow.html"><a href="basic-control-flow.html"><i class="fa fa-check"></i><b>6.1</b> Basic Control Flow</a></li>
Expand Down
Loading