You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: instructors.Rmd
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ An additional half-day could add the next two lessons:
71
71
72
72
Time-permitting, you can fit in one of these shorter lessons that cover bigger picture ideas like best practices for organizing code, reproducible research, and creating packages:
73
73
74
-
6.[Best practices for using R and designing programs](06-best-practices.html)
74
+
6.[Best practices for using R and designing programs](06-best-practices-R.html)
75
75
7.[Dynamic reports with knitr](07-knitr-R.html)
76
76
8.[Making packages in R](08-making-packages-R.html)
77
77
@@ -85,13 +85,13 @@ Time-permitting, you can fit in one of these shorter lessons that cover bigger p
85
85
86
86
```{r}
87
87
dat <- read.csv("data/inflammation-01.csv", header = FALSE)
88
-
element <- c("o", "x", "y", "g", "e", "n")
88
+
animal <- c("m", "o", "n", "k", "e", "y")
89
89
# Challenge - Slicing (subsetting data)
90
-
element[4:1] # first 4 characters in reverse order
91
-
element[-1] # remove first character
92
-
element[-4] # remove fourth character
93
-
element[-1:-4] # remove firts to fourth characters
Copy file name to clipboardExpand all lines: instructors.html
+11-11Lines changed: 11 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ <h2 id="overall">Overall</h2>
48
48
</ol>
49
49
<p>Time-permitting, you can fit in one of these shorter lessons that cover bigger picture ideas like best practices for organizing code, reproducible research, and creating packages:</p>
50
50
<olstart="6" style="list-style-type: decimal">
51
-
<li><ahref="06-best-practices.html">Best practices for using R and designing programs</a></li>
51
+
<li><ahref="06-best-practices-R.html">Best practices for using R and designing programs</a></li>
52
52
<li><ahref="07-knitr-R.html">Dynamic reports with knitr</a></li>
53
53
<li><ahref="08-making-packages-R.html">Making packages in R</a></li>
54
54
</ol>
@@ -58,21 +58,21 @@ <h2 id="analyzing-patient-data"><a href="01-starting-with-data.html">Analyzing P
58
58
<li><p>Provide shortcut for the assignment operator (<code><-</code>) (RStudio: Alt+- on Windows/Linux; Option+- on Mac)</p></li>
<preclass="sourceCode r"><codeclass="sourceCode r">animal[-<spanclass="dv">1</span>:-<spanclass="dv">4</span>] <spanclass="co"># remove first to fourth characters</span></code></pre>
<preclass="sourceCode r"><codeclass="sourceCode r">element[<spanclass="kw">c</span>(<spanclass="dv">5</span>, <spanclass="dv">1</span>, <spanclass="dv">6</span>)] <spanclass="co"># new character vector</span></code></pre>
75
+
<preclass="sourceCode r"><codeclass="sourceCode r">animal[<spanclass="kw">c</span>(<spanclass="dv">5</span>, <spanclass="dv">2</span>, <spanclass="dv">3</span>)] <spanclass="co"># new character vector</span></code></pre>
Copy file name to clipboardExpand all lines: instructors.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ An additional half-day could add the next two lessons:
69
69
70
70
Time-permitting, you can fit in one of these shorter lessons that cover bigger picture ideas like best practices for organizing code, reproducible research, and creating packages:
71
71
72
-
6.[Best practices for using R and designing programs](06-best-practices.html)
72
+
6.[Best practices for using R and designing programs](06-best-practices-R.html)
73
73
7.[Dynamic reports with knitr](07-knitr-R.html)
74
74
8.[Making packages in R](08-making-packages-R.html)
75
75
@@ -84,61 +84,61 @@ Time-permitting, you can fit in one of these shorter lessons that cover bigger p
84
84
85
85
~~~{.r}
86
86
dat <- read.csv("data/inflammation-01.csv", header = FALSE)
87
-
element <- c("o", "x", "y", "g", "e", "n")
87
+
animal <- c("m", "o", "n", "k", "e", "y")
88
88
# Challenge - Slicing (subsetting data)
89
-
element[4:1] # first 4 characters in reverse order
89
+
animal[4:1] # first 4 characters in reverse order
90
90
~~~
91
91
92
92
93
93
94
94
~~~{.output}
95
-
[1] "g" "y" "x" "o"
95
+
[1] "k" "n" "o" "m"
96
96
97
97
~~~
98
98
99
99
100
100
101
101
~~~{.r}
102
-
element[-1] # remove first character
102
+
animal[-1] # remove first character
103
103
~~~
104
104
105
105
106
106
107
107
~~~{.output}
108
-
[1] "x" "y" "g" "e" "n"
108
+
[1] "o" "n" "k" "e" "y"
109
109
110
110
~~~
111
111
112
112
113
113
114
114
~~~{.r}
115
-
element[-4] # remove fourth character
115
+
animal[-4] # remove fourth character
116
116
~~~
117
117
118
118
119
119
120
120
~~~{.output}
121
-
[1] "o" "x" "y" "e" "n"
121
+
[1] "m" "o" "n" "e" "y"
122
122
123
123
~~~
124
124
125
125
126
126
127
127
~~~{.r}
128
-
element[-1:-4] # remove firts to fourth characters
0 commit comments