-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update schedule, add first worksheet
- Loading branch information
1 parent
db2f48f
commit 71aa5a9
Showing
17 changed files
with
308 additions
and
123 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: "Homework 1" | ||
format: typst | ||
editor: visual | ||
--- | ||
|
||
```{r} | ||
#| echo: false | ||
#| message: false | ||
# !! Do not edit this code chunk !! | ||
library(tidyverse) | ||
``` | ||
|
||
**This homework is due on Jan. 23, 2024 at 11:00pm. Please submit as a pdf file on Canvas.** | ||
|
||
**Problem 1: (8 pts)** Demonstrate basic command of Quarto document editing by creating a bulleted list with three items, a numbered list with three items, and a sentence that has one word in bold and one word in italics. | ||
|
||
*Your text goes here.* | ||
|
||
**Problem 2: (6 pts)** The `economics` dataset contains various time series data from the US economy: | ||
|
||
```{r} | ||
economics | ||
``` | ||
|
||
Use ggplot to make a line plot of the total population (`pop`, in thousands) versus time (column `date`). | ||
|
||
```{r} | ||
# your code goes here | ||
``` | ||
|
||
**Problem 3: (6 pts)** Again using the `economics` dataset, now make a scatter plot (using `geom_point()`) of the number of unemployed versus the total population (`pop`), and color points by date. | ||
|
||
```{r} | ||
# your code goes here | ||
``` |
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
title: "Intro to Quarto" | ||
format: | ||
typst: | ||
fig-width: 4 | ||
fig-height: 2.5 | ||
editor: visual | ||
--- | ||
|
||
All assignments in this class will be done via [Quarto documents.](https://quarto.org) Quarto documents are documents that combine text, code, and output, including figures. They are a great way to produce self-contained and documented statistical analyses. Quarto has support for a variety of popular programming languages for data analysis, including R and python. | ||
|
||
In this first worksheet, you will learn how to do some basic Quarto editing. After you have made a change to the document, press "Render" in R Studio and see what kind of a result you get. All assignments will be submitted as pdf files and therefore this Quarto document renders into a pdf as well. | ||
|
||
Edit only below this line. | ||
|
||
------------------------------------------------------------------------ | ||
|
||
## 1. Basic Markdown editing | ||
|
||
Try out basic editing features, as described here: <https://quarto.org/docs/visual-editor/#overview>. Write some text that is bold, and some that is in italics. Make a numbered list and a bulleted list. Make a nested list. Try the block-quote feature. | ||
|
||
Also try both the visual and the source editing mode and see which one you prefer. | ||
|
||
*Your text goes here.* | ||
|
||
## 2. Embedding R code | ||
|
||
R code embedded in R chunks will be executed and the output will be shown. | ||
|
||
```{r} | ||
library(ggplot2) | ||
ggplot(mtcars, aes(disp, mpg)) + | ||
geom_point() | ||
``` | ||
|
||
Now you try it. If you know some ggplot, modify the above plot. For example, plot some other data columns (e.g., `hp`, `qsec`, `gear`), or add some color to the plot. If you don't know ggplot but know some other R, try that. If you don't know any R try basic mathematical expressions, such as `45 + 10` or `sqrt(15)`. | ||
|
||
```{r} | ||
# Your R code goes here | ||
``` |
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
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
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
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
Oops, something went wrong.