-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5_getting_help.html
More file actions
1257 lines (1177 loc) · 62.7 KB
/
Copy path5_getting_help.html
File metadata and controls
1257 lines (1177 loc) · 62.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en"><head>
<script src="5_getting_help_files/libs/clipboard/clipboard.min.js"></script>
<script src="5_getting_help_files/libs/quarto-html/tabby.min.js"></script>
<script src="5_getting_help_files/libs/quarto-html/popper.min.js"></script>
<script src="5_getting_help_files/libs/quarto-html/tippy.umd.min.js"></script>
<link href="5_getting_help_files/libs/quarto-html/tippy.css" rel="stylesheet">
<link href="5_getting_help_files/libs/quarto-html/light-border.css" rel="stylesheet">
<link href="5_getting_help_files/libs/quarto-html/quarto-syntax-highlighting-e26003cea8cd680ca0c55a263523d882.css" rel="stylesheet" id="quarto-text-highlighting-styles">
<link href="5_getting_help_files/libs/quarto-contrib/fontawesome6-0.1.0/all.css" rel="stylesheet">
<link href="5_getting_help_files/libs/quarto-contrib/fontawesome6-0.1.0/latex-fontsize.css" rel="stylesheet"><meta charset="utf-8">
<meta name="generator" content="quarto-1.6.39">
<meta name="dcterms.date" content="2026-03-03">
<title>Getting Help with R</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="5_getting_help_files/libs/revealjs/dist/reset.css">
<link rel="stylesheet" href="5_getting_help_files/libs/revealjs/dist/reveal.css">
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
ul.task-list{list-style: none;}
ul.task-list li input[type="checkbox"] {
width: 0.8em;
margin: 0 0.8em 0.2em -1em; /* quarto-specific, see https://github.com/quarto-dev/quarto-cli/issues/4556 */
vertical-align: middle;
}
/* CSS for syntax highlighting */
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ color: #003b4f; background-color: #f1f3f5; }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span { color: #003b4f; } /* Normal */
code span.al { color: #ad0000; } /* Alert */
code span.an { color: #5e5e5e; } /* Annotation */
code span.at { color: #657422; } /* Attribute */
code span.bn { color: #ad0000; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #003b4f; font-weight: bold; } /* ControlFlow */
code span.ch { color: #20794d; } /* Char */
code span.cn { color: #8f5902; } /* Constant */
code span.co { color: #5e5e5e; } /* Comment */
code span.cv { color: #5e5e5e; font-style: italic; } /* CommentVar */
code span.do { color: #5e5e5e; font-style: italic; } /* Documentation */
code span.dt { color: #ad0000; } /* DataType */
code span.dv { color: #ad0000; } /* DecVal */
code span.er { color: #ad0000; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #ad0000; } /* Float */
code span.fu { color: #4758ab; } /* Function */
code span.im { color: #00769e; } /* Import */
code span.in { color: #5e5e5e; } /* Information */
code span.kw { color: #003b4f; font-weight: bold; } /* Keyword */
code span.op { color: #5e5e5e; } /* Operator */
code span.ot { color: #003b4f; } /* Other */
code span.pp { color: #ad0000; } /* Preprocessor */
code span.sc { color: #5e5e5e; } /* SpecialChar */
code span.ss { color: #20794d; } /* SpecialString */
code span.st { color: #20794d; } /* String */
code span.va { color: #111111; } /* Variable */
code span.vs { color: #20794d; } /* VerbatimString */
code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
</style>
<link rel="stylesheet" href="5_getting_help_files/libs/revealjs/dist/theme/quarto-560a7fb8c8fb23736e113fee4ef09eaa.css">
<link href="5_getting_help_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.css" rel="stylesheet">
<link href="5_getting_help_files/libs/revealjs/plugin/reveal-menu/menu.css" rel="stylesheet">
<link href="5_getting_help_files/libs/revealjs/plugin/reveal-menu/quarto-menu.css" rel="stylesheet">
<link href="5_getting_help_files/libs/revealjs/plugin/quarto-support/footer.css" rel="stylesheet">
<style type="text/css">
.reveal div.sourceCode {
margin: 0;
overflow: auto;
}
.reveal div.hanging-indent {
margin-left: 1em;
text-indent: -1em;
}
.reveal .slide:not(.center) {
height: 100%;
}
.reveal .slide.scrollable {
overflow-y: auto;
}
.reveal .footnotes {
height: 100%;
overflow-y: auto;
}
.reveal .slide .absolute {
position: absolute;
display: block;
}
.reveal .footnotes ol {
counter-reset: ol;
list-style-type: none;
margin-left: 0;
}
.reveal .footnotes ol li:before {
counter-increment: ol;
content: counter(ol) ". ";
}
.reveal .footnotes ol li > p:first-child {
display: inline-block;
}
.reveal .slide ul,
.reveal .slide ol {
margin-bottom: 0.5em;
}
.reveal .slide ul li,
.reveal .slide ol li {
margin-top: 0.4em;
margin-bottom: 0.2em;
}
.reveal .slide ul[role="tablist"] li {
margin-bottom: 0;
}
.reveal .slide ul li > *:first-child,
.reveal .slide ol li > *:first-child {
margin-block-start: 0;
}
.reveal .slide ul li > *:last-child,
.reveal .slide ol li > *:last-child {
margin-block-end: 0;
}
.reveal .slide .columns:nth-child(3) {
margin-block-start: 0.8em;
}
.reveal blockquote {
box-shadow: none;
}
.reveal .tippy-content>* {
margin-top: 0.2em;
margin-bottom: 0.7em;
}
.reveal .tippy-content>*:last-child {
margin-bottom: 0.2em;
}
.reveal .slide > img.stretch.quarto-figure-center,
.reveal .slide > img.r-stretch.quarto-figure-center {
display: block;
margin-left: auto;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-left,
.reveal .slide > img.r-stretch.quarto-figure-left {
display: block;
margin-left: 0;
margin-right: auto;
}
.reveal .slide > img.stretch.quarto-figure-right,
.reveal .slide > img.r-stretch.quarto-figure-right {
display: block;
margin-left: auto;
margin-right: 0;
}
</style>
</head>
<body class="quarto-light">
<div class="reveal">
<div class="slides">
<section id="title-slide" data-background-image="figures/horst_communities.png" data-background-position="90% 50%" data-background-size="60%" class="center">
<p class="absolute" style="top:0">Workshop: Dealing with Data in R</p>
<h1 class="title" style="padding-top: 150px;">Getting Help with R</h1>
<h3 class="subtitle" style="padding-top:5px;"><strong>After this workshop</strong></h3>
<p style="font-size:70%; padding-top: 120px">
<i class="fa-brands fa-github"></i> <a href="https://github.com/steffilazerte">steffilazerte</a><br>
<i class="fa-brands fa-mastodon"></i> <a href="https://fosstodon.org/@steffilazerte">@steffilazerte@fosstodon.org</a><br>
<i class="fa-brands fa-twitter"></i> <a href="https://twitter.com/steffilazerte">@steffilazerte</a><br>
<i class="fa-solid fa-globe"></i> <a href="https://steffilazerte.ca">steffilazerte.ca</a><br>
<img src="figures/steffi_logo.png" width="30%">
</p>
<p class="date">Compiled: 2026-03-03</p>
</section>
<section>
<section id="first-things-first" class="title-slide slide level1 center">
<h1>First things first</h1>
<div style="text-align:left; padding: 15px 200px 15px 200px">
<p><i class="fa-solid fa-floppy-disk" aria-label="floppy-disk"></i> Save previous script<br>
<i class="fa-solid fa-pen" aria-label="pen"></i> Consider taking notes during this section</p>
</div>
</section>
<section id="section" class="slide level2" data-menu-title="What next?" data-background-image="figures/horst_knowing_so_little.png" title="Illustrated line plot of "How much I think I know about R" on the y-axis, and "Time" on the x-axis. Along the line are emoji-style faces, showing the non-linear progression of R knowledge over time. At first, a nervous face becomes a happy face early on in learning, then a "grimace" face at an intermediate peak before a steep decline (with an exhausted face at the local minimum). Then, a determined face charges back up a hill, reaching another peak with a "mind blown" face and text annotation "join R community on twitter" followed by another decline, but this time the faces look happy even though their "How much I think I know about R" value is declining.">
<h2></h2>
<p><span class="footnote">Artwork by <a href="https://twitter.com/allison_horst/"><span class="citation" data-cites="allison_horst">@allison_horst</span></a></span></p>
</section></section>
<section>
<section id="troubleshooting" class="title-slide slide level1 center">
<h1>Troubleshooting</h1>
</section>
<section id="section-1" class="slide level2" data-menu-title="Troubleshooting" data-background-image="figures/horst_need_a_moment.png" data-background-size="90%" title="A frustrated little monster sits on the ground with his hat next to him, saying "I just need a minute." Looking on empathetically is the R logo, with the word "Error" in many different styles behind it.">
<h2></h2>
<p><span class="footnote">Artwork by <a href="https://twitter.com/allison_horst/"><span class="citation" data-cites="allison_horst">@allison_horst</span></a></span></p>
</section>
<section id="bit-by-bit" class="slide level2">
<h2>Bit by bit</h2>
<h3 id="line-by-line">Line by line</h3>
<ul>
<li>R is sequential</li>
<li>If you skip lines, you’re not running that part (and R has no idea)</li>
</ul>
<div class="cell">
<div class="sourceCode cell-code" id="cb1"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb1-1"><a href=""></a><span class="co">#a <- 1</span></span>
<span id="cb1-2"><a href=""></a>b <span class="ot"><-</span> <span class="dv">2</span></span>
<span id="cb1-3"><a href=""></a>a <span class="sc">+</span> b</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-error">
<pre><code>Error:
! object 'a' not found</code></pre>
</div>
</div>
<div class="fragment">
<ul>
<li>Error? Start at the beginning and go line by line</li>
</ul>
<div class="cell">
<div class="sourceCode cell-code" id="cb3"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb3-1"><a href=""></a>a <span class="ot"><-</span> <span class="dv">1</span></span>
<span id="cb3-2"><a href=""></a>b <span class="ot"><-</span> <span class="dv">2</span></span>
<span id="cb3-3"><a href=""></a>a <span class="sc">+</span> b</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] 3</code></pre>
</div>
</div>
</div>
</section>
<section id="bit-by-bit-1" class="slide level2">
<h2>Bit by bit</h2>
<h3 id="line-by-line-1">Line by line</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb5-1"><a href=""></a><span class="fu">library</span>(tidyverse)</span>
<span id="cb5-2"><a href=""></a></span>
<span id="cb5-3"><a href=""></a><span class="co"># Load Data</span></span>
<span id="cb5-4"><a href=""></a>size <span class="ot"><-</span> <span class="fu">read_csv</span>(<span class="st">"./data/grain_size2.csv"</span>)</span>
<span id="cb5-5"><a href=""></a></span>
<span id="cb5-6"><a href=""></a><span class="co"># First modification</span></span>
<span id="cb5-7"><a href=""></a>size <span class="ot"><-</span> <span class="fu">mutate</span>(size, </span>
<span id="cb5-8"><a href=""></a> <span class="at">total_sand =</span> coarse_sand <span class="sc">+</span> medium_sand <span class="sc">+</span> fine_sand,</span>
<span id="cb5-9"><a href=""></a> <span class="at">total_silt =</span> coarse_silt <span class="sc">+</span> medium_silt <span class="sc">+</span> fine_silt)</span>
<span id="cb5-10"><a href=""></a></span>
<span id="cb5-11"><a href=""></a><span class="co"># Second modification</span></span>
<span id="cb5-12"><a href=""></a>size <span class="ot"><-</span> size <span class="sc">|></span></span>
<span id="cb5-13"><a href=""></a> <span class="fu">group_by</span>(plot) <span class="sc">|></span></span>
<span id="cb5-14"><a href=""></a> <span class="fu">summarize</span>(<span class="at">n =</span> <span class="fu">n</span>(),</span>
<span id="cb5-15"><a href=""></a> <span class="at">total_sand =</span> <span class="fu">sum</span>(total_sand),</span>
<span id="cb5-16"><a href=""></a> <span class="at">mean_sand =</span> <span class="fu">mean</span>(total_sand),</span>
<span id="cb5-17"><a href=""></a> <span class="at">sd_sand =</span> <span class="fu">sd</span>(total_sand),</span>
<span id="cb5-18"><a href=""></a> <span class="at">se_sand =</span> sd_sand <span class="sc">/</span> <span class="fu">sqrt</span>(n))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p><span class="note fragment absolute" style="left: 75%; bottom: 60%; ">Especially important if loading and modifying data</span></p>
<p><span class="note fragment absolute" style="left: 65%; bottom: 10%; ">Can’t run 1st modification<br>after 2nd modification</span></p>
</section>
<section id="bit-by-bit-2" class="slide level2">
<h2>Bit by bit</h2>
<h3 id="section-by-section">Section by section</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb6-1"><a href=""></a><span class="fu">library</span>(tidyverse)</span>
<span id="cb6-2"><a href=""></a></span>
<span id="cb6-3"><a href=""></a>size <span class="ot"><-</span> <span class="fu">read_csv</span>(<span class="st">"./data/grain_size2.csv"</span>) <span class="sc">|></span></span>
<span id="cb6-4"><a href=""></a> <span class="fu">mutate</span>(<span class="at">total_sand =</span> coarse_sand <span class="sc">+</span> medium_sand <span class="sc">+</span> fine_sand,</span>
<span id="cb6-5"><a href=""></a> <span class="at">total_silt =</span> coarse_silt <span class="sc">+</span> medium_silt <span class="sc">+</span> fine_silt) <span class="sc">|></span></span>
<span id="cb6-6"><a href=""></a> <span class="fu">group_by</span>(plot) <span class="sc">|></span></span>
<span id="cb6-7"><a href=""></a> <span class="fu">summarize</span>(<span class="at">n =</span> <span class="fu">n</span>(),</span>
<span id="cb6-8"><a href=""></a> <span class="at">total_sand =</span> <span class="fu">sum</span>(total_sand),</span>
<span id="cb6-9"><a href=""></a> <span class="at">mean_sand =</span> <span class="fu">mean</span>(totall_sand),</span>
<span id="cb6-10"><a href=""></a> <span class="at">sd_sand =</span> <span class="fu">sd</span>(total_sand),</span>
<span id="cb6-11"><a href=""></a> <span class="at">se_sand =</span> sd_sand <span class="sc">/</span> <span class="fu">sqrt</span>(n))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-error">
<pre><code>Error in `summarize()`:
ℹ In argument: `mean_sand = mean(totall_sand)`.
ℹ In group 1: `plot = "CSP01"`.
Caused by error:
! object 'totall_sand' not found</code></pre>
</div>
</div>
</section>
<section id="bit-by-bit-3" class="slide level2">
<h2>Bit by bit</h2>
<h3 id="section-by-section-1">Section by section</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb8"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb8-1"><a href=""></a><span class="fu">library</span>(tidyverse)</span>
<span id="cb8-2"><a href=""></a></span>
<span id="cb8-3"><a href=""></a>size <span class="ot"><-</span> <span class="fu">read_csv</span>(<span class="st">"./data/grain_size2.csv"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>No error</p>
<div class="fragment">
<div class="cell">
<div class="sourceCode cell-code" id="cb9"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb9-1"><a href=""></a>size <span class="ot"><-</span> <span class="fu">read_csv</span>(<span class="st">"./data/grain_size2.csv"</span>) <span class="sc">|></span></span>
<span id="cb9-2"><a href=""></a> <span class="fu">mutate</span>(<span class="at">total_sand =</span> coarse_sand <span class="sc">+</span> medium_sand <span class="sc">+</span> fine_sand,</span>
<span id="cb9-3"><a href=""></a> <span class="at">total_silt =</span> coarse_silt <span class="sc">+</span> medium_silt <span class="sc">+</span> fine_silt)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>No error</p>
</div>
<div class="fragment">
<div class="cell">
<div class="sourceCode cell-code" id="cb10"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb10-1"><a href=""></a>size <span class="ot"><-</span> <span class="fu">read_csv</span>(<span class="st">"./data/grain_size2.csv"</span>) <span class="sc">|></span></span>
<span id="cb10-2"><a href=""></a> <span class="fu">mutate</span>(<span class="at">total_sand =</span> coarse_sand <span class="sc">+</span> medium_sand <span class="sc">+</span> fine_sand,</span>
<span id="cb10-3"><a href=""></a> <span class="at">total_silt =</span> coarse_silt <span class="sc">+</span> medium_silt <span class="sc">+</span> fine_silt) <span class="sc">|></span></span>
<span id="cb10-4"><a href=""></a> <span class="fu">group_by</span>(plot) </span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p>No error</p>
</div>
</section>
<section id="bit-by-bit-4" class="slide level2">
<h2>Bit by bit</h2>
<h3 id="section-by-section-2">Section by section</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb11"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb11-1"><a href=""></a>size <span class="ot"><-</span> <span class="fu">read_csv</span>(<span class="st">"./data/grain_size2.csv"</span>) <span class="sc">|></span></span>
<span id="cb11-2"><a href=""></a> <span class="fu">mutate</span>(<span class="at">total_sand =</span> coarse_sand <span class="sc">+</span> medium_sand <span class="sc">+</span> fine_sand,</span>
<span id="cb11-3"><a href=""></a> <span class="at">total_silt =</span> coarse_silt <span class="sc">+</span> medium_silt <span class="sc">+</span> fine_silt) <span class="sc">|></span></span>
<span id="cb11-4"><a href=""></a> <span class="fu">group_by</span>(plot) <span class="sc">|></span></span>
<span id="cb11-5"><a href=""></a> <span class="fu">summarize</span>(<span class="at">n =</span> <span class="fu">n</span>(),</span>
<span id="cb11-6"><a href=""></a> <span class="at">total_sand =</span> <span class="fu">sum</span>(total_sand),</span>
<span id="cb11-7"><a href=""></a> <span class="at">mean_sand =</span> <span class="fu">mean</span>(totall_sand),</span>
<span id="cb11-8"><a href=""></a> <span class="at">sd_sand =</span> <span class="fu">sd</span>(total_sand),</span>
<span id="cb11-9"><a href=""></a> <span class="at">se_sand =</span> sd_sand <span class="sc">/</span> <span class="fu">sqrt</span>(n))</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-error">
<pre><code>Error in `summarize()`:
ℹ In argument: `mean_sand = mean(totall_sand)`.
ℹ In group 1: `plot = "CSP01"`.
Caused by error:
! object 'totall_sand' not found</code></pre>
</div>
</div>
<p>Ah ha!</p>
</section>
<section id="bit-by-bit-5" class="slide level2">
<h2>Bit by bit</h2>
<h3 id="applies-to-error-messages-too">Applies to error messages too</h3>
<ul>
<li>First, don’t panic!</li>
<li>Look at the error bit by bit</li>
</ul>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>Error: Problem with `summarise()` column `mean_sand`.
ℹ `mean_sand = mean(totall_sand)`.
x object 'totall_sand' not found
ℹ The error occurred in group 1: plot = "CSP01".</code></pre>
</div>
</div>
</section>
<section id="bit-by-bit-6" class="slide level2">
<h2>Bit by bit</h2>
<h3 id="applies-to-error-messages-too-1">Applies to error messages too</h3>
<pre><code>Error: Problem with 'summarise()' column 'mean_sand'`</code></pre>
<p>Okay, we know the problem is in the <code>summarize()</code> part and then <code>mean_sand</code> part of that</p>
<div class="fragment spacer">
<pre><code>ℹ 'mean_sand = mean(totall_sand)'
x object 'totall_sand' not found</code></pre>
<p>Looks like this is the line with the problem.<br>
And the problem is <code>object 'totall_sand' not found</code>.</p>
<p><strong>Ooops! Typo!</strong></p>
</div>
<div class="fragment spacer">
<pre><code>ℹ The error occurred in group 1: plot = "CSP01".</code></pre>
<p>Lastly, it’s telling us that the problem was when working with this group of data.</p>
<p>(This can be useful when troubleshooting, because you can <code>filter()</code> your data and take a look)</p>
</div>
</section>
<section id="section-2" class="slide level2" data-menu-title="Troubleshooting" data-background-image="figures/horst_debugging.png" data-background-size="90%" title="A cartoon of a fuzzy round monster face showing 10 different emotions experienced during the process of debugging code. The progression goes from (1) "I got this" - looking determined and optimistic; (2) "Huh. Really thought that was it." - looking a bit baffled; (3) "..." - looking up at the ceiling in thought; (4) "Fine. Restarting." - looking a bit annoyed; (5) "OH WTF." Looking very frazzled and frustrated; (6) "Zombie meltdown." - looking like a full meltdown; (7) (blank) - sleeping; (8) "A NEW HOPE!" - a happy looking monster with a lightbulb above; (9) "insert awesome theme song" - looking determined and typing away; (10) "I love coding" - arms raised in victory with a big smile, with confetti falling.">
<h2></h2>
<p><span class="footnote">Artwork by <a href="https://github.com/allisonhorst/stats-illustrations"><span class="citation" data-cites="allison_horst">@allison_horst</span></a></span></p>
</section></section>
<section id="r-is-never-wrong" class="title-slide slide level1 center">
<h1>R is never wrong</h1>
<p><span class="large fragment">Just sometimes unhelpful!</span></p>
</section>
<section>
<section id="getting-help" class="title-slide slide level1 center">
<h1>Getting Help</h1>
</section>
<section id="cheat-sheets" class="slide level2">
<h2>Cheat Sheets</h2>
<h3 id="rstudio-menu">RStudio Menu</h3>
<ul>
<li>Help
<ul>
<li>Cheatsheets</li>
</ul></li>
</ul>
<p><span class="note absolute" style="">Take a look yourself</span></p>
</section>
<section id="section-3" class="slide level2" data-menu-title="Cheat Sheets" data-background-image="figures/ggplot.png" data-background-size="70%" title="Screenshot of the cheatsheet. The HTML version here: "https://rstudio.github.io/cheatsheets/html/data-visualization.html"">
<h2></h2>
</section>
<section id="vignettes" class="slide level2">
<h2>Vignettes</h2>
<p>Many packages come with vignettes (tutorials)</p>
<h3 id="list-vignettes">List Vignettes</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb17"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb17-1"><a href=""></a><span class="fu">vignette</span>(<span class="at">package =</span> <span class="st">"ggplot2"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<pre><code>Vignettes in package ‘ggplot2’:
ggplot2-specs Aesthetic specifications (source, html)
extending-ggplot2 Extending ggplot2 (source, html)
profiling Profiling Performance (source, html)</code></pre>
<div class="fragment">
<h3 id="load-vignettes">Load Vignettes</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb19"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb19-1"><a href=""></a><span class="fu">vignette</span>(<span class="st">"ggplot2-specs"</span>, <span class="at">package =</span> <span class="st">"ggplot2"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<p><span class="note absolute" style="">Try it!</span></p>
</div>
</section>
<section id="tutorials" class="slide level2">
<h2>Tutorials</h2>
<h3 id="vignettes-are-also-online">Vignettes are also online</h3>
<ul>
<li>e.g., <a href="https://ggplot2.tidyverse.org"><code>ggplot2</code></a></li>
<li>e.g., <a href="https://tidyverse.org"><code>tidyverse</code></a></li>
</ul>
<h3 id="organizationswebsites">Organizations/Websites</h3>
<ul>
<li><a href="https://software-carpentry.org/">Software Carpentry</a></li>
<li><a href="http://www.sthda.com/english/">STHDA</a></li>
</ul>
<p><img data-src="figures/tidyverse_ggplot2.png" class="absolute" style="top: 10%; right: -5%; width: 68%; " alt="A screenshot of the ggplot2 website"></p>
</section>
<section id="books" class="slide level2">
<h2>Books!</h2>
<h3 id="free-online">Free Online</h3>
<ul>
<li><a href="https://r4ds.hadley.nz/">R for Data Science</a> (read it!)</li>
<li><a href="https://r-graphics.org/">R Graphics Cookbook</a> (how to do X)</li>
<li><a href="https://ggplot2-book.org/"><code>ggplot2</code></a> (next level)</li>
<li><a href="http://socviz.co/">Data Visualization: A practical introduction</a></li>
<li><a href="https://bookdown.org/robinlovelace/geocompr/">Geocomputation with R</a> (spatial, GIS, maps)</li>
<li><a href="https://moderndive.com">Statistical Inference via Data Science: A ModernDive into R and the tidyverse</a> (stats)</li>
</ul>
<!-- ### U of M Library - Online -->
<!-- - [The R Book](https://search.lib.umanitoba.ca/permalink/01UMB_INST/o2jqjb/wilbookl10.1002%252F9781118448908) -->
<!-- - [Generalized Linear Models With Examples in R](https://search.lib.umanitoba.ca/permalink/01UMB_INST/1ckhu3a/alma99149458994801651) -->
<!-- - [Linear Mixed-Effects Models Using R A Step-by-Step Approach](https://search.lib.umanitoba.ca/permalink/01UMB_INST/1ckhu3a/alma99143075480001651) -->
<!-- - [Mixed Effects Models and Extensions in Ecology with R](https://search.lib.umanitoba.ca/permalink/01UMB_INST/1ckhu3a/alma99149017057101651) -->
</section>
<section id="communities" class="slide level2">
<h2>Communities!</h2>
<ul>
<li><a href="https://ropensci.org/">rOpenSci</a></li>
<li>Social Media
<ul>
<li><a href="https://twitter.com/search?q=%23Rstats&src=hashtag_click">#RStats Twitter</a></li>
<li>#RStats Mastodon (e.g., <a href="https://fosstodon.org/tags/rstats">Fosstodon.org</a> or <a href="https://hachyderm.io/tags/rstats">Hachyderm.io</a>)</li>
</ul></li>
<li><a href="https://datacarpentry.org/lessons/">Data Carpentry Lessons</a></li>
<li><a href="https://dslc.io/">Data Science Learning Community on Slack</a><br><span class="small">(ask any question, they’re really nice!)</span></li>
</ul>
<h3 id="specific-groups">Specific Groups</h3>
<ul>
<li><a href="https://www.rladies.org/">rLadies</a></li>
<li><a href="https://mircommunity.com/">MiR</a></li>
<li><a href="https://r4africa.org/events/">AfricaR</a></li>
<li><a href="https://github.com/asiar-community">AsiaR</a></li>
</ul>
<p><img data-src="figures/ropensci.png" class="absolute" style="top: 0px; right: 30%; width: 20%; " alt="rOpenSci logo"> <img data-src="figures/rladies.png" class="absolute" style="left: 25%; bottom: -5px; width: 15%; " alt="rLadies logo"> <img data-src="figures/hex_mir.png" class="absolute" style="left: 25%; bottom: 25%; width: 12%; " alt="Minorities in R hex logo"> <img data-src="figures/hex_asiar.png" class="absolute" style="left: 40%; bottom: 25%; width: 15%; " alt="AsiaR hex logo"> <img data-src="figures/hex_africar.png" class="absolute" style="left: 10%; bottom: 0px; width: 15%; " alt="AfricaR hex logo"> <img data-src="figures/horst_communities.png" class="absolute" style="bottom: -5%; right: 0px; width: 55%; " alt="Two fuzzy monsters standing side-by-side outside of a door frame through which is a magical wonderland of different R communities, with a "mind blown" rainbow coming out of the one closest to the door. A welcome mat says "Welcome.""></p>
</section></section>
<section>
<section id="specific-help" class="title-slide slide level1 center">
<h1>Specific help</h1>
</section>
<section id="examples" class="slide level2">
<h2>Examples</h2>
<h3 id="in-r">In R</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb20"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb20-1"><a href=""></a>?geom_boxplot</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<blockquote>
<p>Copy and paste the examples into your console</p>
</blockquote>
</section>
<section id="examples-1" class="slide level2">
<h2>Examples</h2>
<h3 id="on-the-web">On the web</h3>
<ul>
<li>Nice to see expected output</li>
<li>Helps figure out if it’s your system or your code</li>
</ul>
<p><img data-src="figures/ggplot_examples.png" class="absolute" style="bottom: 0px; right: 0px; width: 50%; " alt="Screenshot of some examples on the ggplot2 website"></p>
</section>
<section id="web-searches" class="slide level2 space-list">
<h2>Web searches</h2>
<ul>
<li><strong>Always include “R” in the search</strong></li>
<li><strong>Include the package name!</strong></li>
<li><strong>Use keywords</strong></li>
<li><strong>Some errors are very general</strong></li>
</ul>
</section>
<section id="web-searches-1" class="slide level2 space-list">
<h2>Web searches</h2>
<ul>
<li><strong>Always include “R” in the search</strong></li>
<li><strong>Include the package name!</strong>
<ul>
<li>Try “R boxplots” vs. “R boxplots ggplot2”</li>
</ul></li>
<li><strong>Use keywords</strong>
<ul>
<li>Try “R boxplots ggplot2 notch”</li>
</ul></li>
<li><strong>Some errors are very general</strong>
<ul>
<li>Try “R Error: object ‘m’ not found”</li>
</ul></li>
</ul>
</section></section>
<section>
<section id="stackoverflow-etc." class="title-slide slide level1 center">
<h1>Stackoverflow etc.</h1>
<p><span class="large"><a href="https://stackoverflow.com/questions/13967063/remove-duplicated-rows">“R how to remove duplicate rows”</a></span></p>
</section>
<section id="stackoverflow-etc.-1" class="slide level2 space-list">
<h2>Stackoverflow etc.</h2>
<h3 id="things-to-consider">Things to consider</h3>
<ul>
<li>Date (i.e., R version, Package Version)</li>
<li>Packages used (<code>tidyverse</code>? R base? A mix?)</li>
<li>What are the example data?
<ul>
<li><code>mtcars</code> and <code>iris</code> are commonly used data sets built into R base</li>
<li><code>msleep</code> and <code>diamonds</code> are commonly used data sets built into <code>ggplot2</code></li>
</ul></li>
<li>What are the example columns?</li>
<li>What is actually required to answer <em>your</em> question?</li>
</ul>
</section>
<section id="ai-specifically-llms" class="slide level2">
<h2>AI (specifically LLMs) ✨</h2>
<h3 id="general-cautions">General Cautions</h3>
<ul>
<li>Can be useful, can be painful</li>
<li>Free models are so-so</li>
<li>R changes fast, so AI answers can be out of date</li>
<li>Own your work</li>
</ul>
<p><img data-src="figures/ai_meme2.jpeg" class="absolute" style="top: 10%; right: -5%; width: 45%; " alt=""></p>
</section>
<section id="ai-specifically-llms-1" class="slide level2">
<h2>AI (specifically LLMs) ✨</h2>
<div class="columns">
<div class="column">
<h3 id="good-usecases-use-ai-to">Good usecases: Use AI to…</h3>
<ul>
<li><em>Support</em> your work, not <em>do</em> you work</li>
<li>Remind yourself (enhanced search)</li>
<li>Help troubleshooting
<ul>
<li>Rubber duck that answers back</li>
<li>Even incorrect answers can help</li>
</ul></li>
<li>Ask for suggestions for improvement</li>
</ul>
</div><div class="column">
<h3 id="bad-usecases-do-not-use-ai-to">Bad usecases: Do NOT use AI to…</h3>
<ul>
<li>Create code you can’t evaluate (Too soon)</li>
<li>Have AI create code you don’t evaluate (Too fast)</li>
<li>Work with private/sensitive data</li>
</ul>
</div></div>
<p><img data-src="figures/ai_meme1.jpeg" class="absolute" style="bottom: 0px; right: 10%; width: 30%; " alt=""></p>
</section>
<section id="asking-people-for-help" class="slide level2">
<h2>Asking people for Help</h2>
<h3 id="not-useful">Not useful</h3>
<ul>
<li>“I got an error”</li>
<li>“It didn’t work”</li>
</ul>
<div class="fragment">
<h3 id="better">Better!</h3>
<ul>
<li>“I got <em>this</em> error”</li>
<li>“It didn’t give me <em>this</em>”</li>
</ul>
</div>
<div class="fragment">
<h3 id="best">Best!!</h3>
<ul>
<li>“I did <em>this</em> and I got <em>this</em> error”</li>
<li>“I expected it to do <em>this</em>, but in fact the output was <em>this</em>”</li>
</ul>
</div>
<div class="fragment">
<h3 id="best-of-the-best">Best of the Best!!!</h3>
<ul>
<li>“I did <em>this</em> [small reproducible code, including data set] and I got <em>this</em> [exact error/output]”</li>
</ul>
</div>
</section>
<section id="reproducible-examples" class="slide level2 space-list">
<h2>Reproducible Examples</h2>
<ul>
<li>Minimal code and data required to reproduce the error</li>
<li>Often preparing this actually helps you solve the error!</li>
<li>Includes
<ul>
<li>packages (<code>library()</code>)</li>
<li>data</li>
<li>runnable code</li>
</ul></li>
</ul>
</section>
<section id="reproducible-examples-1" class="slide level2">
<h2>Reproducible Examples</h2>
<h3 id="how-do-i-change-the-order-of-vore">How do I change the order of <code>vore</code>?</h3>
<h3 id="not-reproducible">Not reproducible</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb21"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb21-1"><a href=""></a><span class="fu">ggplot</span>(<span class="at">data =</span> m, <span class="fu">aes</span>(<span class="at">x =</span> vore, <span class="at">y =</span> awake, <span class="at">fill =</span> <span class="st">`</span><span class="at">Body Size</span><span class="st">`</span>)) <span class="sc">+</span></span>
<span id="cb21-2"><a href=""></a> <span class="fu">theme_bw</span>() <span class="sc">+</span> </span>
<span id="cb21-3"><a href=""></a> <span class="fu">theme</span>(<span class="at">axis.title.x =</span> <span class="fu">element_blank</span>()) <span class="sc">+</span></span>
<span id="cb21-4"><a href=""></a> <span class="fu">geom_boxplot</span>() <span class="sc">+</span></span>
<span id="cb21-5"><a href=""></a> <span class="fu">scale_fill_viridis_d</span>() <span class="sc">+</span></span>
<span id="cb21-6"><a href=""></a> <span class="fu">labs</span>(<span class="at">y =</span> <span class="st">"Awake time (hrs)"</span>,</span>
<span id="cb21-7"><a href=""></a> <span class="at">title =</span> <span class="st">"Awake time by Diet"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-error">
<pre><code>Error:
! object 'm' not found</code></pre>
</div>
</div>
<ul>
<li>No indication of packages</li>
<li>No indication of what <code>m</code> is</li>
</ul>
</section>
<section id="reproducible-examples-2" class="slide level2">
<h2>Reproducible Examples</h2>
<h3 id="how-do-i-change-the-order-of-vore-1">How do I change the order of <code>vore</code>?</h3>
<h3 id="reproducible-but-not-minimal">Reproducible, but not minimal</h3>
<div class="small">
<div class="cell columns column-output-location">
<div class="column">
<div class="sourceCode cell-code" id="cb23" data-code-line-numbers="1,3-5"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb23-1"><a href=""></a><span class="fu">library</span>(ggplot2)</span>
<span id="cb23-2"><a href=""></a></span>
<span id="cb23-3"><a href=""></a>m <span class="ot"><-</span> msleep <span class="sc">|></span></span>
<span id="cb23-4"><a href=""></a> <span class="fu">mutate</span>(<span class="st">`</span><span class="at">Body Size</span><span class="st">`</span> <span class="ot">=</span> <span class="fu">if_else</span>(bodywt <span class="sc">></span> <span class="fu">median</span>(bodywt),</span>
<span id="cb23-5"><a href=""></a> <span class="st">"Large"</span>, <span class="st">"Small"</span>))</span>
<span id="cb23-6"><a href=""></a></span>
<span id="cb23-7"><a href=""></a><span class="fu">ggplot</span>(m, <span class="fu">aes</span>(<span class="at">x =</span> vore, <span class="at">y =</span> awake, <span class="at">fill =</span> <span class="st">`</span><span class="at">Body Size</span><span class="st">`</span>)) <span class="sc">+</span></span>
<span id="cb23-8"><a href=""></a> <span class="fu">theme_bw</span>() <span class="sc">+</span> </span>
<span id="cb23-9"><a href=""></a> <span class="fu">theme</span>(<span class="at">axis.title.x =</span> <span class="fu">element_blank</span>()) <span class="sc">+</span></span>
<span id="cb23-10"><a href=""></a> <span class="fu">geom_boxplot</span>() <span class="sc">+</span></span>
<span id="cb23-11"><a href=""></a> <span class="fu">scale_fill_viridis_d</span>() <span class="sc">+</span></span>
<span id="cb23-12"><a href=""></a> <span class="fu">labs</span>(<span class="at">y =</span> <span class="st">"Awake time (hrs)"</span>,</span>
<span id="cb23-13"><a href=""></a> <span class="at">title =</span> <span class="st">"Awake time by Diet"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div><div class="column">
<div class="cell-output-display">
<div>
<figure>
<p><img data-src="5_getting_help_files/figure-revealjs/unnamed-chunk-16-1.png" width="1200"></p>
</figure>
</div>
</div>
</div></div>
</div>
</section>
<section id="reproducible-examples-3" class="slide level2">
<h2>Reproducible Examples</h2>
<h3 id="how-do-i-change-the-order-of-vore-2">How do I change the order of <code>vore</code>?</h3>
<h3 id="reproducible-and-minimal">Reproducible AND Minimal</h3>
<div class="cell columns column-output-location">
<div class="column">
<div class="sourceCode cell-code" id="cb24"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb24-1"><a href=""></a><span class="fu">library</span>(ggplot2)</span>
<span id="cb24-2"><a href=""></a></span>
<span id="cb24-3"><a href=""></a><span class="fu">ggplot</span>(msleep, <span class="fu">aes</span>(<span class="at">x =</span> vore, <span class="at">y =</span> awake)) <span class="sc">+</span></span>
<span id="cb24-4"><a href=""></a> <span class="fu">geom_boxplot</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div><div class="column">
<div class="cell-output-display">
<div>
<figure>
<p><img data-src="5_getting_help_files/figure-revealjs/unnamed-chunk-17-1.png" width="1200"></p>
</figure>
</div>
</div>
</div></div>
</section></section>
<section>
<section id="paying-it-forward" class="title-slide slide level1 center">
<h1>Paying it forward</h1>
</section>
<section id="citing-software" class="slide level2">
<h2>Citing Software</h2>
<h3 id="in-line-text">In-line Text</h3>
<ul>
<li>Software name</li>
<li>Version</li>
<li>Programmers/authors OR Journal article releasing the software (if available)</li>
</ul>
<h3 id="bibliography">Bibliography</h3>
<ul>
<li>Journal article releasing the program <strong>OR</strong></li>
<li>Programmers/authors</li>
<li>Year of release</li>
<li>Program Name</li>
<li>URL</li>
</ul>
</section>
<section id="citing-r" class="slide level2">
<h2>Citing R</h2>
<h3 id="inline">Inline</h3>
<p>“All statistical analyses were performed with R statistical software (v4.5.2, R Core Team 2025).”</p>
<h3 class="spacer" id="bibliography-1">Bibliography</h3>
<p>R Core Team (2025). <em>R: A Language and Environment for Statistical Computing</em>. R Foundation for Statistical Computing, Vienna, Austria. <a href="https://www.R-project.org/" class="uri">https://www.R-project.org/</a>.</p>
</section>
<section id="citing-r-1" class="slide level2">
<h2>Citing R</h2>
<h3 id="version-information">Version information</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb25"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb25-1"><a href=""></a><span class="fu">R.Version</span>()<span class="sc">$</span>version.string</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] "R version 4.5.2 (2025-10-31)"</code></pre>
</div>
</div>
<h3 id="citation-information">Citation information</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb27"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb27-1"><a href=""></a><span class="fu">citation</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>To cite R in publications use:
R Core Team (2025). _R: A Language and Environment for Statistical
Computing_. R Foundation for Statistical Computing, Vienna, Austria.
<https://www.R-project.org/>.</code></pre>
</div>
</div>
</section>
<section id="citing-r-packages" class="slide level2">
<h2>Citing R Packages</h2>
<h3 id="inline-1">Inline</h3>
<p>“All statistical analyses were performed with R statistical software (v4.0.3, R Core Team 2020). We performed Type III ANOVAs using the ‘car’ package for R (v3.0.10, Fox and Weisberg 2019).”</p>
<h3 class="spacer" id="bibliography-2">Bibliography</h3>
<p>John Fox and Sanford Weisberg (2019). An R Companion to Applied Regression, Third Edition. Thousand Oaks CA: Sage.</p>
</section>
<section id="citing-r-packages-1" class="slide level2">
<h2>Citing R Packages</h2>
<h3 id="version-information-1">Version information</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb29"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb29-1"><a href=""></a><span class="fu">packageVersion</span>(<span class="st">"car"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre><code>[1] '3.1.5'</code></pre>
</div>
</div>
<h3 id="citation-information-1">Citation information</h3>
<div class="cell">
<div class="sourceCode cell-code" id="cb31"><pre class="sourceCode numberSource r number-lines code-with-copy"><code class="sourceCode r"><span id="cb31-1"><a href=""></a><span class="fu">citation</span>(<span class="st">"car"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
</div>
<div class="cell">
<div class="cell-output cell-output-stdout">
<pre><code>To cite the car package in publications use:
Fox J, Weisberg S (2019). _An R Companion to Applied Regression_,
Third edition. Sage, Thousand Oaks CA.
<https://www.john-fox.ca/Companion/>.</code></pre>
</div>
</div>
<div class="spacer">
<p>See more about citing packages in my rOpenSci blog post: <a href="https://ropensci.org/blog/2021/11/16/how-to-cite-r-and-r-packages/">How to Cite R and R packages</a></p>
</div>
</section>
<section id="section-4" class="slide level2" data-menu-title="You made it!" data-background-image="figures/horst_monster.jpg" data-background-size="90%" data-background-position="50% 40%" title="On the left, an R-logo with a scary face, and a small scared little fuzzy monster holding up a white flag in surrender while under a dark storm cloud. The text above says "at first I was like…". On the right, a friendly, smiling R-logo jumping up to give a happy fuzzy monster a high-five under a smiling sun and next to colorful flowers. The text above reads "but now it’s like…"">
<h2></h2>
<p><span class="footnote">Artwork by <a href="https://github.com/allisonhorst/stats-illustrations"><span class="citation" data-cites="allison_horst">@allison_horst</span></a></span></p>
<div class="center" style="margin-top:45%">
<h3 id="you-made-it">You made it!</h3>
<h3 id="thank-you">Thank you!</h3>
<p>(Feedback!)</p>
</div>
</section></section>
</div>
<div class="quarto-auto-generated-content" style="display: none;">
<div class="footer footer-default">
</div>
</div></div>
<script>window.backupDefine = window.define; window.define = undefined;</script>
<script src="5_getting_help_files/libs/revealjs/dist/reveal.js"></script>
<!-- reveal.js plugins -->
<script src="5_getting_help_files/libs/revealjs/plugin/quarto-line-highlight/line-highlight.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/pdf-export/pdfexport.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/reveal-menu/menu.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/reveal-menu/quarto-menu.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/quarto-support/support.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/notes/notes.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/search/search.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/zoom/zoom.js"></script>
<script src="5_getting_help_files/libs/revealjs/plugin/math/math.js"></script>
<script>window.define = window.backupDefine; window.backupDefine = undefined;</script>
<script>
// Full list of configuration options available at:
// https://revealjs.com/config/
Reveal.initialize({
'controlsAuto': true,
'previewLinksAuto': false,
'pdfSeparateFragments': false,
'autoAnimateEasing': "ease",
'autoAnimateDuration': 1,
'autoAnimateUnmatched': true,
'jumpToSlide': true,
'menu': {"side":"left","useTextContentForMissingTitles":true,"markers":false,"loadIcons":false,"custom":[{"title":"Tools","icon":"<i class=\"fas fa-gear\"></i>","content":"<ul class=\"slide-menu-items\">\n<li class=\"slide-tool-item active\" data-item=\"0\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.fullscreen(event)\"><kbd>f</kbd> Fullscreen</a></li>\n<li class=\"slide-tool-item\" data-item=\"1\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.speakerMode(event)\"><kbd>s</kbd> Speaker View</a></li>\n<li class=\"slide-tool-item\" data-item=\"2\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.overview(event)\"><kbd>o</kbd> Slide Overview</a></li>\n<li class=\"slide-tool-item\" data-item=\"3\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.togglePdfExport(event)\"><kbd>e</kbd> PDF Export Mode</a></li>\n<li class=\"slide-tool-item\" data-item=\"4\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.toggleScrollView(event)\"><kbd>r</kbd> Scroll View Mode</a></li>\n<li class=\"slide-tool-item\" data-item=\"5\"><a href=\"#\" onclick=\"RevealMenuToolHandlers.keyboardHelp(event)\"><kbd>?</kbd> Keyboard Help</a></li>\n</ul>"}],"openButton":true},
'smaller': false,
// Display controls in the bottom right corner
controls: false,
// Help the user learn the controls by providing hints, for example by
// bouncing the down arrow when they first encounter a vertical slide
controlsTutorial: false,
// Determines where controls appear, "edges" or "bottom-right"
controlsLayout: 'edges',
// Visibility rule for backwards navigation arrows; "faded", "hidden"
// or "visible"
controlsBackArrows: 'faded',
// Display a presentation progress bar
progress: true,
// Display the page number of the current slide
slideNumber: 'c/t',
// 'all', 'print', or 'speaker'
showSlideNumber: 'all',
// Add the current slide number to the URL hash so that reloading the
// page/copying the URL will return you to the same slide
hash: true,
// Start with 1 for the hash rather than 0
hashOneBasedIndex: false,
// Flags if we should monitor the hash and change slides accordingly
respondToHashChanges: true,
// Push each slide change to the browser history
history: true,
// Enable keyboard shortcuts for navigation
keyboard: true,
// Enable the slide overview mode
overview: true,
// Disables the default reveal.js slide layout (scaling and centering)
// so that you can use custom CSS layout
disableLayout: false,
// Vertical centering of slides
center: false,
// Enables touch navigation on devices with touch input
touch: true,
// Loop the presentation
loop: false,
// Change the presentation direction to be RTL
rtl: false,
// see https://revealjs.com/vertical-slides/#navigation-mode
navigationMode: 'linear',
// Randomizes the order of slides each time the presentation loads
shuffle: false,
// Turns fragments on and off globally
fragments: true,
// Flags whether to include the current fragment in the URL,
// so that reloading brings you to the same fragment position
fragmentInURL: false,
// Flags if the presentation is running in an embedded mode,
// i.e. contained within a limited portion of the screen
embedded: false,
// Flags if we should show a help overlay when the questionmark
// key is pressed
help: true,
// Flags if it should be possible to pause the presentation (blackout)
pause: true,
// Flags if speaker notes should be visible to all viewers
showNotes: false,
// Global override for autoplaying embedded media (null/true/false)
autoPlayMedia: null,
// Global override for preloading lazy-loaded iframes (null/true/false)
preloadIframes: null,
// Number of milliseconds between automatically proceeding to the
// next slide, disabled when set to 0, this value can be overwritten
// by using a data-autoslide attribute on your slides
autoSlide: 0,
// Stop auto-sliding after user input
autoSlideStoppable: true,
// Use this method for navigation when auto-sliding
autoSlideMethod: null,
// Specify the average time in seconds that you think you will spend
// presenting each slide. This is used to show a pacing timer in the
// speaker view
defaultTiming: null,
// Enable slide navigation via mouse wheel
mouseWheel: false,
// The display mode that will be used to show slides
display: 'block',
// Hide cursor if inactive
hideInactiveCursor: true,
// Time before the cursor is hidden (in ms)
hideCursorTime: 5000,
// Opens links in an iframe preview overlay
previewLinks: false,
// Transition style (none/fade/slide/convex/concave/zoom)
transition: 'none',
// Transition speed (default/fast/slow)
transitionSpeed: 'default',
// Transition style for full page slide backgrounds
// (none/fade/slide/convex/concave/zoom)
backgroundTransition: 'none',
// Number of slides away from the current that are visible
viewDistance: 3,
// Number of slides away from the current that are visible on mobile
// devices. It is advisable to set this to a lower number than
// viewDistance in order to save resources.
mobileViewDistance: 2,
// The "normal" size of the presentation, aspect ratio will be preserved
// when the presentation is scaled to fit different resolutions. Can be
// specified using percentage units.
width: 1200,
height: 700,