Skip to content

Commit 2f53e60

Browse files
author
Susan Vanderplas
committed
Updating callouts in part i
1 parent 9ba8e09 commit 2f53e60

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

part-tools/04-scripts-notebooks.qmd

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ There are lots of other things you *can* do, but those are the two big ones.
8686
Let's try launching R and python from a system terminal, and then see that we can get the same windows within RStudio.
8787
Keeping all of the windows you need for programming in one place is one of the most important features of an **integrated development environment (IDE)** like RStudio.
8888

89-
::: callout-tip
90-
### Your Turn - Interactive Command Prompts in R and Python
89+
::: diy
90+
### Try it out! Interactive Command Prompts in R and Python
9191

9292
::: panel-tabset
9393

@@ -159,10 +159,8 @@ In many languages, scripts are intended to run on their own, from start to finis
159159
We often call this **executing** a script, and this is typically done from a terminal prompt.
160160

161161

162-
::: callout-tip
163-
164-
165-
#### Your Turn - Scripts and Terminals
162+
::: diy
163+
#### Try it out! Scripts and Terminals
166164

167165
Let's take a minute and see how someone might **call** or **run** a script from the terminal.
168166

@@ -249,8 +247,8 @@ This is because in R, to include a file of commands within another script, you r
249247

250248
The difference between sourcing, running, and executing a script is fairly nuanced and the vocabulary is often used interchangeably, which doesn't help you as you're learning!
251249

252-
::: callout-tip
253-
#### Your Turn - Sourcing a Script
250+
::: diy
251+
#### Try it out! Sourcing a Script
254252

255253
If you haven't already, download [scripts.zip](../files/scripts.zip) and unzip the file.
256254

@@ -363,7 +361,7 @@ We will use quarto markdown documents for most of the components of this class b
363361

364362
While literate documents aren't ideal for jobs where a computer is doing things unobserved (such as pulling data from a web page every hour), they are extremely useful in situations where it is desireable to have both code and an explanation of what the code is doing and what the results of that code are in the same document.
365363

366-
::: callout-tip
364+
::: diy
367365

368366
#### Your Turn - Words in quarto
369367

@@ -385,7 +383,7 @@ Congratulations, you've just compiled your first Quarto document!
385383
:::
386384

387385

388-
::: callout-tip
386+
::: diy
389387
#### Your turn - Quarto Markdown
390388

391389
In RStudio, create a new quarto markdown document: File \> New File \> Quarto Document. Give your document a title and an author, and select HTML as the output.
@@ -451,7 +449,7 @@ Where quarto comes primarily out of the R community and those who are agnostic w
451449
Quarto supports using the jupyter engine for chunk compilation, but jupyter notebooks have some (rather technical) features that make them less desirable for an introductory computing class [@xieFirstNotebookWar2018].
452450
As a result, this book makes an opinionated decision to prefer quarto over jupyter.
453451

454-
::: callout-learnmore
452+
::: learnmore
455453
#### Learn More about Notebooks
456454

457455
There are some excellent opinions surrounding the use of notebooks in data analysis:

part-tools/05-git-and-github.qmd

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ There is an entire textbook on how to use git and GitHub with R, Happy Git and G
1313
## What is Version Control ?
1414

1515
::: {.callout-note}
16-
Most of this section is either heavily inspired by Happy Git and Github for the UseR [@bryanHappyGitGitHub2021] or directly links to that book. There's no sense trying to repeat something that's pretty close to perfect.
16+
Most of this section is either heavily inspired by Happy Git and Github for the UseR [@bryanHappyGitGitHub2021] or directly links to that book.
17+
There's no sense trying to repeat something that's pretty close to perfect.
1718
:::
1819

1920
Git is a **version control system** - a structured way for tracking changes to files over the course of a project that may also make it easy to have multiple people working on the same files at the same time.
@@ -100,10 +101,7 @@ Make sure you've completed the steps in @sec-setting-up-github before you proce
100101
**Repositories** are single-project containers. You may have code, documentation, data, TODO lists, and more associated with a project. If you combine a git repository with an RStudio project, you get a very powerful combination that will make your life much easier, allowing you to focus on writing code instead of figuring out where all of your files are for each different project you start.
101102

102103
To create a repository, you can start with your local computer first, or you can start with the online repository first.
103-
104-
::: {.callout-important}
105-
Both methods are relatively simple, but the options you choose depend on which method you're using, so be careful not to get them confused.
106-
:::
104+
Both methods are relatively simple, but the options you choose depend on which method you're using, so be careful to pick one approach (and remember which one you picked!) for each new project.
107105

108106
::: panel-tabset
109107

@@ -231,7 +229,10 @@ These files are used by your operating system or by RStudio, and pushing them ma
231229
Tracking changes to these files also doesn't really do much good.
232230
This is why I recommend that you run `usethis::git_vaccinate()`, which tells git to ignore these files for every repository on a machine.
233231

234-
I **highly** recommend that you make a point to only add and commit files which you consciously want to track.
232+
233+
**While you are learning, you should only add and commit files which you created manually and consciously want to track.**
234+
You do not need to commit both a quarto `.qmd` file and the `.html` file it generates -- keeping only the quarto file is enough.
235+
You *do* need to make sure to commit any pictures or files referenced in the files you create, though (as long as they're relatively small in size and not confidential), because otherwise, your project won't be self-contained.
235236

236237
### Staging your changes
237238

@@ -268,7 +269,7 @@ Work to commit every time you've accomplished a small task. This will do two th
268269
When you're working alone, you generally won't need to worry about having to update your local copy of the repository (unless you're using multiple machines).
269270
However, statistics is collaborative, and one of the most powerful parts of git is that you can use it to keep track of changes when multiple people are working on the same document.
270271

271-
::: .watch-out
272+
::: callout-caution
272273
If you are working collaboratively and you and your collaborator are working on the same file, git will be able to resolve the change you make SO LONG AS YOU'RE NOT EDITING THE SAME LINE.
273274
Git works based on lines of text - it detects when there is a change in any line of a text document.
274275

part-tools/06-documents.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ I'm not convinced LaTeX succeeds at freeing you from layout concerns, but it's c
258258
The philosophy of LaTeX is that presentation shouldn't get in the way of content: you should be able to change the presentation formatting systematically, without having to mess with the content.
259259
This (theoretically) allows you to switch templates easily, make document-wide changes in a single command, and more.
260260

261-
::: callout-tip
261+
::: diy
262262

263263
### Try it out
264264

@@ -303,7 +303,7 @@ You can, for instance, start your document with `\documentclass[12pt]{article}`
303303
One of the most useful features in LaTeX is math mode, which you can enter by enclosing text in `$ ... $` (for inline statements), `$$ ... $$` or `\[ ... \]` (for statements on their own line), or using other environments like `\begin{array} ... \end{array}` that come in math-specific packages.
304304
Once in math mode, you can use [math symbol commands](https://www.caam.rice.edu/~heinken/latex/symbols.pdf) to get characters like $\theta, \pi, \sum, \int, \infty$, and more.
305305

306-
::: callout-tip
306+
::: diy
307307
### Try it out
308308

309309
With any document creation software, the easiest way to learn how to do it is to find a sample document, tinker with it, see if you can make things the way you want them to be, and then google the errors when you inevitably screw something up.
@@ -394,7 +394,7 @@ Standard trade-offs (formatting details vs. document complexity) apply.
394394
Check out the [UNL-themed Beamer quarto template](https://github.com/unl-statistics/Templates/tree/main/slides-beamer-markdown)
395395
:::
396396

397-
::: callout-tip
397+
::: diy
398398
#### Try it out
399399

400400
Download and compile [beamer-demo.Rnw](../files/beamer-demo.Rnw).
@@ -477,7 +477,7 @@ UNL themed HTML presentations:
477477
- [quarto reveal.js](https://github.com/unl-statistics/Templates/tree/main/slides-revealjs-quarto) ([zip of all required files](https://github.com/unl-statistics/Templates/raw/main/slides-revealjs-quarto.zip))
478478
:::
479479

480-
::: callout-tip
480+
::: diy
481481
### Try it out
482482

483483
Take a few minutes and try each of them out to see what feels right to you.
@@ -500,7 +500,7 @@ As with beamer, you can easily integrate knitr code chunks into a document, so t
500500

501501
Basic code for a poster in beamer (along with the necessary style files) that I've minimally customized to meet UNL branding requirements can be found [here](https://github.com/unl-statistics/Templates/raw/main/poster-beamer.zip).
502502

503-
::: callout-tip
503+
::: diy
504504
#### Try it out
505505

506506
Download the beamer template and do the following:
@@ -538,7 +538,7 @@ The `pagedown` package also has a couple of poster templates, including [poster-
538538

539539
There are also templates for letters, business cards, and more in pagedown, if you're feeling ambitious.
540540

541-
::: callout-tip
541+
::: diy
542542
#### Try it out
543543

544544
Download the pagedown template and do the following:

0 commit comments

Comments
 (0)