class: monash-bg-blue center middle hide-slide-number <div class="bg-black white" style="width:45%;right:0;bottom:0;padding-left:5px;border: solid 4px white;margin: auto;"> <i class="fas fa-exclamation-circle"></i> These slides are viewed best by Chrome and occasionally need to be refreshed if elements did not load properly. See here for <a href=day2-session1.pdf>PDF <i class="fas fa-file-pdf"></i></a>. </div> <br> .white[Press the **right arrow** to progress to the next slide!] --- count: false background-image: url(images/bg1.jpg) background-size: cover class: hide-slide-number title-slide <div class="grid-row" style="grid: 1fr / 2fr;"> .item.center[ # <span style="text-shadow: 2px 2px 30px white;">Data Wrangling with R: Day 2</span> <!-- ## <span style="color:;text-shadow: 2px 2px 30px black;">Relational data wrangling, <br>starring `janitor` and `broom`</span> --> ] .center.shade_black.animated.bounceInUp.slower[ <br><br> ## <span style="color: #ccf2ff; text-shadow: 10px 10px 100px white;">Relational data wrangling, <br>starring `janitor` and `broom`</span> <br> Presented by Emi Tanaka Department of Econometrics and Business Statistics <img src="images/monash-one-line-reversed.png" style="width:500px"><br>
<i class="fas fa-envelope faa-float animated "></i>
emi.tanaka@monash.edu
<i class="fab fa-twitter faa-float animated faa-fast "></i>
@statsgen .bottom_abs.width100.bg-black[ 2nd December 2020 @ Statistical Society of Australia | Zoom ] ] </div> --- class: transition middle # Relational data --- class: middle center ## Do you rememember what the <br>definition of a .monash-blue[tidy data] is? -- .info-box[ **Definition of a tidy data** * Each variable must have its own column * Each observation must have its own row * Each value must have its own cell ] --- # Observational unit <div class="grid" style="grid: 1fr / 1fr 3fr;"> .item[ <img src="images/day2-session1/unnamed-chunk-2-1.png" style="display: block; margin: auto;" /> ] .item[ * In the original definition in Wickham (2014), which was a statistical version of the definition in Codd (1990), the third point originally was actually: <blockquote> Each type of observational unit forms a table. </blockquote> {{content}} ] </div> .footnote[ Codd EF. 1990. The Relational Model for Database Management: Version 2. Addison-WesleyLongman Publishing, Boston. Wickham, Hadley. 2014. “Tidy Data.” Journal of Statistical Software, Articles 59 (10): 1–23. ] -- * What is an **observational unit**? {{content}} -- * It's the unit in which measurement is made, e.g. if measure height of a person then the person is the observational unit --- # Multiple observational units in one table .grid[ .item50[ ```r df ``` ``` ## year variety height period temperature ## 1 1974 G01 81.0 T1 8.36 ## 2 1974 G01 81.0 T2 9.60 ## 3 1974 G01 81.0 T3 12.11 ## 4 1974 G01 81.0 T4 12.13 ## 5 1974 G01 81.0 T5 18.43 ## 6 1974 G01 81.0 T6 13.75 ## 7 1975 G01 67.3 T1 7.66 ## 8 1975 G01 67.3 T2 11.66 ## 9 1975 G01 67.3 T3 10.06 ## 10 1975 G01 67.3 T4 15.95 ## 11 1975 G01 67.3 T5 16.49 ## 12 1975 G01 67.3 T6 18.34 ## 13 1976 G01 71.5 T1 7.50 ## 14 1976 G01 71.5 T2 12.13 ## 15 1976 G01 71.5 T3 13.08 ## 16 1976 G01 71.5 T4 17.44 ## 17 1976 G01 71.5 T5 18.88 ## 18 1976 G01 71.5 T6 18.66 ## 19 1977 G01 64.3 T1 12.72 ## 20 1977 G01 64.3 T2 12.73 ## 21 1977 G01 64.3 T3 17.39 ## 22 1977 G01 64.3 T4 17.43 ## 23 1977 G01 64.3 T5 13.78 ## 24 1977 G01 64.3 T6 13.88 ## 25 1978 G01 55.8 T1 8.44 ## 26 1978 G01 55.8 T2 16.43 ## 27 1978 G01 55.8 T3 15.63 ## 28 1978 G01 55.8 T4 13.91 ## 29 1978 G01 55.8 T5 14.54 ## 30 1978 G01 55.8 T6 13.81 ## 31 1979 G01 84.9 T1 8.14 ## 32 1979 G01 84.9 T2 15.13 ## 33 1979 G01 84.9 T3 14.47 ## 34 1979 G01 84.9 T4 14.05 ## 35 1979 G01 84.9 T5 15.83 ## 36 1979 G01 84.9 T6 14.96 ## 37 1980 G01 86.2 T1 12.57 ## 38 1980 G01 86.2 T2 11.51 ## 39 1980 G01 86.2 T3 17.91 ## 40 1980 G01 86.2 T4 13.90 ## 41 1980 G01 86.2 T5 16.15 ## 42 1980 G01 86.2 T6 14.84 ## 43 1981 G01 88.0 T1 14.90 ## 44 1981 G01 88.0 T2 12.81 ## 45 1981 G01 88.0 T3 11.85 ## 46 1981 G01 88.0 T4 13.63 ## 47 1981 G01 88.0 T5 16.40 ## 48 1981 G01 88.0 T6 15.82 ## 49 1982 G01 72.0 T1 7.16 ## 50 1982 G01 72.0 T2 10.63 ## 51 1982 G01 72.0 T3 15.83 ## 52 1982 G01 72.0 T4 11.56 ## 53 1982 G01 72.0 T5 13.16 ## 54 1982 G01 72.0 T6 18.91 ## 55 1974 G02 72.3 T1 8.36 ## 56 1974 G02 72.3 T2 9.60 ## 57 1974 G02 72.3 T3 12.11 ## 58 1974 G02 72.3 T4 12.13 ## 59 1974 G02 72.3 T5 18.43 ## 60 1974 G02 72.3 T6 13.75 ## 61 1975 G02 60.3 T1 7.66 ## 62 1975 G02 60.3 T2 11.66 ## 63 1975 G02 60.3 T3 10.06 ## 64 1975 G02 60.3 T4 15.95 ## 65 1975 G02 60.3 T5 16.49 ## 66 1975 G02 60.3 T6 18.34 ## 67 1976 G02 60.8 T1 7.50 ## 68 1976 G02 60.8 T2 12.13 ## 69 1976 G02 60.8 T3 13.08 ## 70 1976 G02 60.8 T4 17.44 ## 71 1976 G02 60.8 T5 18.88 ## 72 1976 G02 60.8 T6 18.66 ## 73 1977 G02 55.3 T1 12.72 ## 74 1977 G02 55.3 T2 12.73 ## 75 1977 G02 55.3 T3 17.39 ## 76 1977 G02 55.3 T4 17.43 ## 77 1977 G02 55.3 T5 13.78 ## 78 1977 G02 55.3 T6 13.88 ## 79 1978 G02 48.8 T1 8.44 ## 80 1978 G02 48.8 T2 16.43 ## 81 1978 G02 48.8 T3 15.63 ## 82 1978 G02 48.8 T4 13.91 ## 83 1978 G02 48.8 T5 14.54 ## 84 1978 G02 48.8 T6 13.81 ## 85 1979 G02 78.1 T1 8.14 ## 86 1979 G02 78.1 T2 15.13 ## 87 1979 G02 78.1 T3 14.47 ## 88 1979 G02 78.1 T4 14.05 ## 89 1979 G02 78.1 T5 15.83 ## 90 1979 G02 78.1 T6 14.96 ## 91 1980 G02 80.4 T1 12.57 ## 92 1980 G02 80.4 T2 11.51 ## 93 1980 G02 80.4 T3 17.91 ## 94 1980 G02 80.4 T4 13.90 ## 95 1980 G02 80.4 T5 16.15 ## 96 1980 G02 80.4 T6 14.84 ## 97 1981 G02 85.3 T1 14.90 ## 98 1981 G02 85.3 T2 12.81 ## 99 1981 G02 85.3 T3 11.85 ## 100 1981 G02 85.3 T4 13.63 ## 101 1981 G02 85.3 T5 16.40 ## 102 1981 G02 85.3 T6 15.82 ## 103 1982 G02 69.8 T1 7.16 ## 104 1982 G02 69.8 T2 10.63 ## 105 1982 G02 69.8 T3 15.83 ## 106 1982 G02 69.8 T4 11.56 ## 107 1982 G02 69.8 T5 13.16 ## 108 1982 G02 69.8 T6 18.91 ## 109 1974 G03 79.3 T1 8.36 ## 110 1974 G03 79.3 T2 9.60 ## 111 1974 G03 79.3 T3 12.11 ## 112 1974 G03 79.3 T4 12.13 ## 113 1974 G03 79.3 T5 18.43 ## 114 1974 G03 79.3 T6 13.75 ## 115 1975 G03 67.8 T1 7.66 ## 116 1975 G03 67.8 T2 11.66 ## 117 1975 G03 67.8 T3 10.06 ## 118 1975 G03 67.8 T4 15.95 ## 119 1975 G03 67.8 T5 16.49 ## 120 1975 G03 67.8 T6 18.34 ## 121 1976 G03 64.8 T1 7.50 ## 122 1976 G03 64.8 T2 12.13 ## 123 1976 G03 64.8 T3 13.08 ## 124 1976 G03 64.8 T4 17.44 ## 125 1976 G03 64.8 T5 18.88 ## 126 1976 G03 64.8 T6 18.66 ## 127 1977 G03 57.5 T1 12.72 ## 128 1977 G03 57.5 T2 12.73 ## 129 1977 G03 57.5 T3 17.39 ## 130 1977 G03 57.5 T4 17.43 ## 131 1977 G03 57.5 T5 13.78 ## 132 1977 G03 57.5 T6 13.88 ## 133 1978 G03 46.8 T1 8.44 ## 134 1978 G03 46.8 T2 16.43 ## 135 1978 G03 46.8 T3 15.63 ## 136 1978 G03 46.8 T4 13.91 ## 137 1978 G03 46.8 T5 14.54 ## 138 1978 G03 46.8 T6 13.81 ## 139 1979 G03 80.2 T1 8.14 ## 140 1979 G03 80.2 T2 15.13 ## 141 1979 G03 80.2 T3 14.47 ## 142 1979 G03 80.2 T4 14.05 ## 143 1979 G03 80.2 T5 15.83 ## 144 1979 G03 80.2 T6 14.96 ## 145 1980 G03 81.8 T1 12.57 ## 146 1980 G03 81.8 T2 11.51 ## 147 1980 G03 81.8 T3 17.91 ## 148 1980 G03 81.8 T4 13.90 ## 149 1980 G03 81.8 T5 16.15 ## 150 1980 G03 81.8 T6 14.84 ## 151 1981 G03 87.8 T1 14.90 ## 152 1981 G03 87.8 T2 12.81 ## 153 1981 G03 87.8 T3 11.85 ## 154 1981 G03 87.8 T4 13.63 ## 155 1981 G03 87.8 T5 16.40 ## 156 1981 G03 87.8 T6 15.82 ## 157 1982 G03 71.8 T1 7.16 ## 158 1982 G03 71.8 T2 10.63 ## 159 1982 G03 71.8 T3 15.83 ## 160 1982 G03 71.8 T4 11.56 ## 161 1982 G03 71.8 T5 13.16 ## 162 1982 G03 71.8 T6 18.91 ## 163 1974 G04 88.5 T1 8.36 ## 164 1974 G04 88.5 T2 9.60 ## 165 1974 G04 88.5 T3 12.11 ## 166 1974 G04 88.5 T4 12.13 ## 167 1974 G04 88.5 T5 18.43 ## 168 1974 G04 88.5 T6 13.75 ## 169 1975 G04 70.8 T1 7.66 ## 170 1975 G04 70.8 T2 11.66 ## 171 1975 G04 70.8 T3 10.06 ## 172 1975 G04 70.8 T4 15.95 ## 173 1975 G04 70.8 T5 16.49 ## 174 1975 G04 70.8 T6 18.34 ## 175 1976 G04 76.3 T1 7.50 ## 176 1976 G04 76.3 T2 12.13 ## 177 1976 G04 76.3 T3 13.08 ## 178 1976 G04 76.3 T4 17.44 ## 179 1976 G04 76.3 T5 18.88 ## 180 1976 G04 76.3 T6 18.66 ## 181 1977 G04 69.5 T1 12.72 ## 182 1977 G04 69.5 T2 12.73 ## 183 1977 G04 69.5 T3 17.39 ## 184 1977 G04 69.5 T4 17.43 ## 185 1977 G04 69.5 T5 13.78 ## 186 1977 G04 69.5 T6 13.88 ## 187 1978 G04 64.0 T1 8.44 ## 188 1978 G04 64.0 T2 16.43 ## 189 1978 G04 64.0 T3 15.63 ## 190 1978 G04 64.0 T4 13.91 ## 191 1978 G04 64.0 T5 14.54 ## 192 1978 G04 64.0 T6 13.81 ## 193 1979 G04 90.8 T1 8.14 ## 194 1979 G04 90.8 T2 15.13 ## 195 1979 G04 90.8 T3 14.47 ## 196 1979 G04 90.8 T4 14.05 ## 197 1979 G04 90.8 T5 15.83 ## 198 1979 G04 90.8 T6 14.96 ## 199 1980 G04 97.3 T1 12.57 ## 200 1980 G04 97.3 T2 11.51 ## 201 1980 G04 97.3 T3 17.91 ## 202 1980 G04 97.3 T4 13.90 ## 203 1980 G04 97.3 T5 16.15 ## 204 1980 G04 97.3 T6 14.84 ## 205 1981 G04 97.8 T1 14.90 ## 206 1981 G04 97.8 T2 12.81 ## 207 1981 G04 97.8 T3 11.85 ## 208 1981 G04 97.8 T4 13.63 ## 209 1981 G04 97.8 T5 16.40 ## 210 1981 G04 97.8 T6 15.82 ## 211 1982 G04 86.0 T1 7.16 ## 212 1982 G04 86.0 T2 10.63 ## 213 1982 G04 86.0 T3 15.83 ## 214 1982 G04 86.0 T4 11.56 ## 215 1982 G04 86.0 T5 13.16 ## 216 1982 G04 86.0 T6 18.91 ## 217 1974 G05 78.5 T1 8.36 ## 218 1974 G05 78.5 T2 9.60 ## 219 1974 G05 78.5 T3 12.11 ## 220 1974 G05 78.5 T4 12.13 ## 221 1974 G05 78.5 T5 18.43 ## 222 1974 G05 78.5 T6 13.75 ## 223 1975 G05 67.5 T1 7.66 ## 224 1975 G05 67.5 T2 11.66 ## 225 1975 G05 67.5 T3 10.06 ## 226 1975 G05 67.5 T4 15.95 ## 227 1975 G05 67.5 T5 16.49 ## 228 1975 G05 67.5 T6 18.34 ## 229 1976 G05 72.5 T1 7.50 ## 230 1976 G05 72.5 T2 12.13 ## 231 1976 G05 72.5 T3 13.08 ## 232 1976 G05 72.5 T4 17.44 ## 233 1976 G05 72.5 T5 18.88 ## 234 1976 G05 72.5 T6 18.66 ## 235 1977 G05 61.0 T1 12.72 ## 236 1977 G05 61.0 T2 12.73 ## 237 1977 G05 61.0 T3 17.39 ## 238 1977 G05 61.0 T4 17.43 ## 239 1977 G05 61.0 T5 13.78 ## 240 1977 G05 61.0 T6 13.88 ## 241 1978 G05 50.3 T1 8.44 ## 242 1978 G05 50.3 T2 16.43 ## 243 1978 G05 50.3 T3 15.63 ## 244 1978 G05 50.3 T4 13.91 ## 245 1978 G05 50.3 T5 14.54 ## 246 1978 G05 50.3 T6 13.81 ## 247 1979 G05 78.7 T1 8.14 ## 248 1979 G05 78.7 T2 15.13 ## 249 1979 G05 78.7 T3 14.47 ## 250 1979 G05 78.7 T4 14.05 ## 251 1979 G05 78.7 T5 15.83 ## 252 1979 G05 78.7 T6 14.96 ## 253 1980 G05 82.7 T1 12.57 ## 254 1980 G05 82.7 T2 11.51 ## 255 1980 G05 82.7 T3 17.91 ## 256 1980 G05 82.7 T4 13.90 ## 257 1980 G05 82.7 T5 16.15 ## 258 1980 G05 82.7 T6 14.84 ## 259 1981 G05 87.3 T1 14.90 ## 260 1981 G05 87.3 T2 12.81 ## 261 1981 G05 87.3 T3 11.85 ## 262 1981 G05 87.3 T4 13.63 ## 263 1981 G05 87.3 T5 16.40 ## 264 1981 G05 87.3 T6 15.82 ## 265 1982 G05 66.0 T1 7.16 ## 266 1982 G05 66.0 T2 10.63 ## 267 1982 G05 66.0 T3 15.83 ## 268 1982 G05 66.0 T4 11.56 ## 269 1982 G05 66.0 T5 13.16 ## 270 1982 G05 66.0 T6 18.91 ## 271 1974 G06 89.3 T1 8.36 ## 272 1974 G06 89.3 T2 9.60 ## 273 1974 G06 89.3 T3 12.11 ## 274 1974 G06 89.3 T4 12.13 ## 275 1974 G06 89.3 T5 18.43 ## 276 1974 G06 89.3 T6 13.75 ## 277 1975 G06 74.5 T1 7.66 ## 278 1975 G06 74.5 T2 11.66 ## 279 1975 G06 74.5 T3 10.06 ## 280 1975 G06 74.5 T4 15.95 ## 281 1975 G06 74.5 T5 16.49 ## 282 1975 G06 74.5 T6 18.34 ## 283 1976 G06 80.5 T1 7.50 ## 284 1976 G06 80.5 T2 12.13 ## 285 1976 G06 80.5 T3 13.08 ## 286 1976 G06 80.5 T4 17.44 ## 287 1976 G06 80.5 T5 18.88 ## 288 1976 G06 80.5 T6 18.66 ## 289 1977 G06 67.8 T1 12.72 ## 290 1977 G06 67.8 T2 12.73 ## 291 1977 G06 67.8 T3 17.39 ## 292 1977 G06 67.8 T4 17.43 ## 293 1977 G06 67.8 T5 13.78 ## 294 1977 G06 67.8 T6 13.88 ## 295 1978 G06 60.8 T1 8.44 ## 296 1978 G06 60.8 T2 16.43 ## 297 1978 G06 60.8 T3 15.63 ## 298 1978 G06 60.8 T4 13.91 ## 299 1978 G06 60.8 T5 14.54 ## 300 1978 G06 60.8 T6 13.81 ## 301 1979 G06 86.3 T1 8.14 ## 302 1979 G06 86.3 T2 15.13 ## 303 1979 G06 86.3 T3 14.47 ## 304 1979 G06 86.3 T4 14.05 ## 305 1979 G06 86.3 T5 15.83 ## 306 1979 G06 86.3 T6 14.96 ## 307 1980 G06 90.2 T1 12.57 ## 308 1980 G06 90.2 T2 11.51 ## 309 1980 G06 90.2 T3 17.91 ## 310 1980 G06 90.2 T4 13.90 ## 311 1980 G06 90.2 T5 16.15 ## 312 1980 G06 90.2 T6 14.84 ## 313 1981 G06 100.0 T1 14.90 ## 314 1981 G06 100.0 T2 12.81 ## 315 1981 G06 100.0 T3 11.85 ## 316 1981 G06 100.0 T4 13.63 ## 317 1981 G06 100.0 T5 16.40 ## 318 1981 G06 100.0 T6 15.82 ## 319 1982 G06 81.3 T1 7.16 ## 320 1982 G06 81.3 T2 10.63 ## 321 1982 G06 81.3 T3 15.83 ## 322 1982 G06 81.3 T4 11.56 ## 323 1982 G06 81.3 T5 13.16 ## 324 1982 G06 81.3 T6 18.91 ## 325 1974 G07 94.3 T1 8.36 ## 326 1974 G07 94.3 T2 9.60 ## 327 1974 G07 94.3 T3 12.11 ## 328 1974 G07 94.3 T4 12.13 ## 329 1974 G07 94.3 T5 18.43 ## 330 1974 G07 94.3 T6 13.75 ## 331 1975 G07 73.0 T1 7.66 ## 332 1975 G07 73.0 T2 11.66 ## 333 1975 G07 73.0 T3 10.06 ## 334 1975 G07 73.0 T4 15.95 ## 335 1975 G07 73.0 T5 16.49 ## 336 1975 G07 73.0 T6 18.34 ## 337 1976 G07 80.3 T1 7.50 ## 338 1976 G07 80.3 T2 12.13 ## 339 1976 G07 80.3 T3 13.08 ## 340 1976 G07 80.3 T4 17.44 ## 341 1976 G07 80.3 T5 18.88 ## 342 1976 G07 80.3 T6 18.66 ## 343 1977 G07 68.5 T1 12.72 ## 344 1977 G07 68.5 T2 12.73 ## 345 1977 G07 68.5 T3 17.39 ## 346 1977 G07 68.5 T4 17.43 ## 347 1977 G07 68.5 T5 13.78 ## 348 1977 G07 68.5 T6 13.88 ## 349 1978 G07 63.8 T1 8.44 ## 350 1978 G07 63.8 T2 16.43 ## 351 1978 G07 63.8 T3 15.63 ## 352 1978 G07 63.8 T4 13.91 ## 353 1978 G07 63.8 T5 14.54 ## 354 1978 G07 63.8 T6 13.81 ## 355 1979 G07 96.0 T1 8.14 ## 356 1979 G07 96.0 T2 15.13 ## 357 1979 G07 96.0 T3 14.47 ## 358 1979 G07 96.0 T4 14.05 ## 359 1979 G07 96.0 T5 15.83 ## 360 1979 G07 96.0 T6 14.96 ## 361 1980 G07 100.7 T1 12.57 ## 362 1980 G07 100.7 T2 11.51 ## 363 1980 G07 100.7 T3 17.91 ## 364 1980 G07 100.7 T4 13.90 ## 365 1980 G07 100.7 T5 16.15 ## 366 1980 G07 100.7 T6 14.84 ## 367 1981 G07 106.5 T1 14.90 ## 368 1981 G07 106.5 T2 12.81 ## 369 1981 G07 106.5 T3 11.85 ## 370 1981 G07 106.5 T4 13.63 ## 371 1981 G07 106.5 T5 16.40 ## 372 1981 G07 106.5 T6 15.82 ## 373 1982 G07 85.3 T1 7.16 ## 374 1982 G07 85.3 T2 10.63 ## 375 1982 G07 85.3 T3 15.83 ## 376 1982 G07 85.3 T4 11.56 ## 377 1982 G07 85.3 T5 13.16 ## 378 1982 G07 85.3 T6 18.91 ## 379 1974 G08 88.8 T1 8.36 ## 380 1974 G08 88.8 T2 9.60 ## 381 1974 G08 88.8 T3 12.11 ## 382 1974 G08 88.8 T4 12.13 ## 383 1974 G08 88.8 T5 18.43 ## 384 1974 G08 88.8 T6 13.75 ## 385 1975 G08 63.8 T1 7.66 ## 386 1975 G08 63.8 T2 11.66 ## 387 1975 G08 63.8 T3 10.06 ## 388 1975 G08 63.8 T4 15.95 ## 389 1975 G08 63.8 T5 16.49 ## 390 1975 G08 63.8 T6 18.34 ## 391 1976 G08 66.8 T1 7.50 ## 392 1976 G08 66.8 T2 12.13 ## 393 1976 G08 66.8 T3 13.08 ## 394 1976 G08 66.8 T4 17.44 ## 395 1976 G08 66.8 T5 18.88 ## 396 1976 G08 66.8 T6 18.66 ## 397 1977 G08 78.5 T1 12.72 ## 398 1977 G08 78.5 T2 12.73 ## 399 1977 G08 78.5 T3 17.39 ## 400 1977 G08 78.5 T4 17.43 ## 401 1977 G08 78.5 T5 13.78 ## 402 1977 G08 78.5 T6 13.88 ## 403 1978 G08 70.3 T1 8.44 ## 404 1978 G08 70.3 T2 16.43 ## 405 1978 G08 70.3 T3 15.63 ## 406 1978 G08 70.3 T4 13.91 ## 407 1978 G08 70.3 T5 14.54 ## 408 1978 G08 70.3 T6 13.81 ## 409 1979 G08 86.1 T1 8.14 ## 410 1979 G08 86.1 T2 15.13 ## 411 1979 G08 86.1 T3 14.47 ## 412 1979 G08 86.1 T4 14.05 ## 413 1979 G08 86.1 T5 15.83 ## 414 1979 G08 86.1 T6 14.96 ## 415 1980 G08 104.3 T1 12.57 ## 416 1980 G08 104.3 T2 11.51 ## 417 1980 G08 104.3 T3 17.91 ## 418 1980 G08 104.3 T4 13.90 ## 419 1980 G08 104.3 T5 16.15 ## 420 1980 G08 104.3 T6 14.84 ## 421 1981 G08 102.0 T1 14.90 ## 422 1981 G08 102.0 T2 12.81 ## 423 1981 G08 102.0 T3 11.85 ## 424 1981 G08 102.0 T4 13.63 ## 425 1981 G08 102.0 T5 16.40 ## 426 1981 G08 102.0 T6 15.82 ## 427 1982 G08 82.5 T1 7.16 ## 428 1982 G08 82.5 T2 10.63 ## 429 1982 G08 82.5 T3 15.83 ## 430 1982 G08 82.5 T4 11.56 ## 431 1982 G08 82.5 T5 13.16 ## 432 1982 G08 82.5 T6 18.91 ## 433 1974 G09 91.3 T1 8.36 ## 434 1974 G09 91.3 T2 9.60 ## 435 1974 G09 91.3 T3 12.11 ## 436 1974 G09 91.3 T4 12.13 ## 437 1974 G09 91.3 T5 18.43 ## 438 1974 G09 91.3 T6 13.75 ## 439 1975 G09 67.0 T1 7.66 ## 440 1975 G09 67.0 T2 11.66 ## 441 1975 G09 67.0 T3 10.06 ## 442 1975 G09 67.0 T4 15.95 ## 443 1975 G09 67.0 T5 16.49 ## 444 1975 G09 67.0 T6 18.34 ## 445 1976 G09 73.8 T1 7.50 ## 446 1976 G09 73.8 T2 12.13 ## 447 1976 G09 73.8 T3 13.08 ## 448 1976 G09 73.8 T4 17.44 ## 449 1976 G09 73.8 T5 18.88 ## 450 1976 G09 73.8 T6 18.66 ## 451 1977 G09 75.8 T1 12.72 ## 452 1977 G09 75.8 T2 12.73 ## 453 1977 G09 75.8 T3 17.39 ## 454 1977 G09 75.8 T4 17.43 ## 455 1977 G09 75.8 T5 13.78 ## 456 1977 G09 75.8 T6 13.88 ## 457 1978 G09 71.5 T1 8.44 ## 458 1978 G09 71.5 T2 16.43 ## 459 1978 G09 71.5 T3 15.63 ## 460 1978 G09 71.5 T4 13.91 ## 461 1978 G09 71.5 T5 14.54 ## 462 1978 G09 71.5 T6 13.81 ## 463 1979 G09 90.5 T1 8.14 ## 464 1979 G09 90.5 T2 15.13 ## 465 1979 G09 90.5 T3 14.47 ## 466 1979 G09 90.5 T4 14.05 ## 467 1979 G09 90.5 T5 15.83 ## 468 1979 G09 90.5 T6 14.96 ## 469 1980 G09 100.6 T1 12.57 ## 470 1980 G09 100.6 T2 11.51 ## 471 1980 G09 100.6 T3 17.91 ## 472 1980 G09 100.6 T4 13.90 ## 473 1980 G09 100.6 T5 16.15 ## 474 1980 G09 100.6 T6 14.84 ## 475 1981 G09 102.8 T1 14.90 ## 476 1981 G09 102.8 T2 12.81 ## 477 1981 G09 102.8 T3 11.85 ## 478 1981 G09 102.8 T4 13.63 ## 479 1981 G09 102.8 T5 16.40 ## 480 1981 G09 102.8 T6 15.82 ## 481 1982 G09 86.3 T1 7.16 ## 482 1982 G09 86.3 T2 10.63 ## 483 1982 G09 86.3 T3 15.83 ## 484 1982 G09 86.3 T4 11.56 ## 485 1982 G09 86.3 T5 13.16 ## 486 1982 G09 86.3 T6 18.91 ## 487 1974 G10 91.8 T1 8.36 ## 488 1974 G10 91.8 T2 9.60 ## 489 1974 G10 91.8 T3 12.11 ## 490 1974 G10 91.8 T4 12.13 ## 491 1974 G10 91.8 T5 18.43 ## 492 1974 G10 91.8 T6 13.75 ## 493 1975 G10 65.5 T1 7.66 ## 494 1975 G10 65.5 T2 11.66 ## 495 1975 G10 65.5 T3 10.06 ## 496 1975 G10 65.5 T4 15.95 ## 497 1975 G10 65.5 T5 16.49 ## 498 1975 G10 65.5 T6 18.34 ## 499 1976 G10 77.0 T1 7.50 ## 500 1976 G10 77.0 T2 12.13 ## 501 1976 G10 77.0 T3 13.08 ## 502 1976 G10 77.0 T4 17.44 ## 503 1976 G10 77.0 T5 18.88 ## 504 1976 G10 77.0 T6 18.66 ## 505 1977 G10 80.0 T1 12.72 ## 506 1977 G10 80.0 T2 12.73 ## 507 1977 G10 80.0 T3 17.39 ## 508 1977 G10 80.0 T4 17.43 ## 509 1977 G10 80.0 T5 13.78 ## 510 1977 G10 80.0 T6 13.88 ## 511 1978 G10 73.5 T1 8.44 ## 512 1978 G10 73.5 T2 16.43 ## 513 1978 G10 73.5 T3 15.63 ## 514 1978 G10 73.5 T4 13.91 ## 515 1978 G10 73.5 T5 14.54 ## 516 1978 G10 73.5 T6 13.81 ## 517 1979 G10 88.0 T1 8.14 ## 518 1979 G10 88.0 T2 15.13 ## 519 1979 G10 88.0 T3 14.47 ## 520 1979 G10 88.0 T4 14.05 ## 521 1979 G10 88.0 T5 15.83 ## 522 1979 G10 88.0 T6 14.96 ## 523 1980 G10 104.7 T1 12.57 ## 524 1980 G10 104.7 T2 11.51 ## 525 1980 G10 104.7 T3 17.91 ## 526 1980 G10 104.7 T4 13.90 ## 527 1980 G10 104.7 T5 16.15 ## 528 1980 G10 104.7 T6 14.84 ## 529 1981 G10 102.0 T1 14.90 ## 530 1981 G10 102.0 T2 12.81 ## 531 1981 G10 102.0 T3 11.85 ## 532 1981 G10 102.0 T4 13.63 ## 533 1981 G10 102.0 T5 16.40 ## 534 1981 G10 102.0 T6 15.82 ## 535 1982 G10 87.3 T1 7.16 ## 536 1982 G10 87.3 T2 10.63 ## 537 1982 G10 87.3 T3 15.83 ## 538 1982 G10 87.3 T4 11.56 ## 539 1982 G10 87.3 T5 13.16 ## 540 1982 G10 87.3 T6 18.91 ## 541 1974 G11 86.0 T1 8.36 ## 542 1974 G11 86.0 T2 9.60 ## 543 1974 G11 86.0 T3 12.11 ## 544 1974 G11 86.0 T4 12.13 ## 545 1974 G11 86.0 T5 18.43 ## 546 1974 G11 86.0 T6 13.75 ## 547 1975 G11 69.8 T1 7.66 ## 548 1975 G11 69.8 T2 11.66 ## 549 1975 G11 69.8 T3 10.06 ## 550 1975 G11 69.8 T4 15.95 ## 551 1975 G11 69.8 T5 16.49 ## 552 1975 G11 69.8 T6 18.34 ## 553 1976 G11 73.8 T1 7.50 ## 554 1976 G11 73.8 T2 12.13 ## 555 1976 G11 73.8 T3 13.08 ## 556 1976 G11 73.8 T4 17.44 ## 557 1976 G11 73.8 T5 18.88 ## 558 1976 G11 73.8 T6 18.66 ## 559 1977 G11 77.3 T1 12.72 ## 560 1977 G11 77.3 T2 12.73 ## 561 1977 G11 77.3 T3 17.39 ## 562 1977 G11 77.3 T4 17.43 ## 563 1977 G11 77.3 T5 13.78 ## 564 1977 G11 77.3 T6 13.88 ## 565 1978 G11 75.5 T1 8.44 ## 566 1978 G11 75.5 T2 16.43 ## 567 1978 G11 75.5 T3 15.63 ## 568 1978 G11 75.5 T4 13.91 ## 569 1978 G11 75.5 T5 14.54 ## 570 1978 G11 75.5 T6 13.81 ## 571 1979 G11 88.8 T1 8.14 ## 572 1979 G11 88.8 T2 15.13 ## 573 1979 G11 88.8 T3 14.47 ## 574 1979 G11 88.8 T4 14.05 ## 575 1979 G11 88.8 T5 15.83 ## 576 1979 G11 88.8 T6 14.96 ## 577 1980 G11 106.4 T1 12.57 ## 578 1980 G11 106.4 T2 11.51 ## 579 1980 G11 106.4 T3 17.91 ## 580 1980 G11 106.4 T4 13.90 ## 581 1980 G11 106.4 T5 16.15 ## 582 1980 G11 106.4 T6 14.84 ## 583 1981 G11 103.8 T1 14.90 ## 584 1981 G11 103.8 T2 12.81 ## 585 1981 G11 103.8 T3 11.85 ## 586 1981 G11 103.8 T4 13.63 ## 587 1981 G11 103.8 T5 16.40 ## 588 1981 G11 103.8 T6 15.82 ## 589 1982 G11 86.8 T1 7.16 ## 590 1982 G11 86.8 T2 10.63 ## 591 1982 G11 86.8 T3 15.83 ## 592 1982 G11 86.8 T4 11.56 ## 593 1982 G11 86.8 T5 13.16 ## 594 1982 G11 86.8 T6 18.91 ## 595 1974 G12 91.0 T1 8.36 ## 596 1974 G12 91.0 T2 9.60 ## 597 1974 G12 91.0 T3 12.11 ## 598 1974 G12 91.0 T4 12.13 ## 599 1974 G12 91.0 T5 18.43 ## 600 1974 G12 91.0 T6 13.75 ## 601 1975 G12 71.8 T1 7.66 ## 602 1975 G12 71.8 T2 11.66 ## 603 1975 G12 71.8 T3 10.06 ## 604 1975 G12 71.8 T4 15.95 ## 605 1975 G12 71.8 T5 16.49 ## 606 1975 G12 71.8 T6 18.34 ## 607 1976 G12 81.0 T1 7.50 ## 608 1976 G12 81.0 T2 12.13 ## 609 1976 G12 81.0 T3 13.08 ## 610 1976 G12 81.0 T4 17.44 ## 611 1976 G12 81.0 T5 18.88 ## 612 1976 G12 81.0 T6 18.66 ## 613 1977 G12 65.5 T1 12.72 ## 614 1977 G12 65.5 T2 12.73 ## 615 1977 G12 65.5 T3 17.39 ## 616 1977 G12 65.5 T4 17.43 ## 617 1977 G12 65.5 T5 13.78 ## 618 1977 G12 65.5 T6 13.88 ## 619 1978 G12 54.5 T1 8.44 ## 620 1978 G12 54.5 T2 16.43 ## 621 1978 G12 54.5 T3 15.63 ## 622 1978 G12 54.5 T4 13.91 ## 623 1978 G12 54.5 T5 14.54 ## 624 1978 G12 54.5 T6 13.81 ## 625 1979 G12 87.9 T1 8.14 ## 626 1979 G12 87.9 T2 15.13 ## 627 1979 G12 87.9 T3 14.47 ## 628 1979 G12 87.9 T4 14.05 ## 629 1979 G12 87.9 T5 15.83 ## 630 1979 G12 87.9 T6 14.96 ## 631 1980 G12 84.8 T1 12.57 ## 632 1980 G12 84.8 T2 11.51 ## 633 1980 G12 84.8 T3 17.91 ## 634 1980 G12 84.8 T4 13.90 ## 635 1980 G12 84.8 T5 16.15 ## 636 1980 G12 84.8 T6 14.84 ## 637 1981 G12 91.8 T1 14.90 ## 638 1981 G12 91.8 T2 12.81 ## 639 1981 G12 91.8 T3 11.85 ## 640 1981 G12 91.8 T4 13.63 ## 641 1981 G12 91.8 T5 16.40 ## 642 1981 G12 91.8 T6 15.82 ## 643 1982 G12 77.8 T1 7.16 ## 644 1982 G12 77.8 T2 10.63 ## 645 1982 G12 77.8 T3 15.83 ## 646 1982 G12 77.8 T4 11.56 ## 647 1982 G12 77.8 T5 13.16 ## 648 1982 G12 77.8 T6 18.91 ## 649 1974 G13 75.5 T1 8.36 ## 650 1974 G13 75.5 T2 9.60 ## 651 1974 G13 75.5 T3 12.11 ## 652 1974 G13 75.5 T4 12.13 ## 653 1974 G13 75.5 T5 18.43 ## 654 1974 G13 75.5 T6 13.75 ## 655 1975 G13 56.5 T1 7.66 ## 656 1975 G13 56.5 T2 11.66 ## 657 1975 G13 56.5 T3 10.06 ## 658 1975 G13 56.5 T4 15.95 ## 659 1975 G13 56.5 T5 16.49 ## 660 1975 G13 56.5 T6 18.34 ## 661 1976 G13 67.0 T1 7.50 ## 662 1976 G13 67.0 T2 12.13 ## 663 1976 G13 67.0 T3 13.08 ## 664 1976 G13 67.0 T4 17.44 ## 665 1976 G13 67.0 T5 18.88 ## 666 1976 G13 67.0 T6 18.66 ## 667 1977 G13 64.3 T1 12.72 ## 668 1977 G13 64.3 T2 12.73 ## 669 1977 G13 64.3 T3 17.39 ## 670 1977 G13 64.3 T4 17.43 ## 671 1977 G13 64.3 T5 13.78 ## 672 1977 G13 64.3 T6 13.88 ## 673 1978 G13 58.8 T1 8.44 ## 674 1978 G13 58.8 T2 16.43 ## 675 1978 G13 58.8 T3 15.63 ## 676 1978 G13 58.8 T4 13.91 ## 677 1978 G13 58.8 T5 14.54 ## 678 1978 G13 58.8 T6 13.81 ## 679 1979 G13 86.7 T1 8.14 ## 680 1979 G13 86.7 T2 15.13 ## 681 1979 G13 86.7 T3 14.47 ## 682 1979 G13 86.7 T4 14.05 ## 683 1979 G13 86.7 T5 15.83 ## 684 1979 G13 86.7 T6 14.96 ## 685 1980 G13 85.2 T1 12.57 ## 686 1980 G13 85.2 T2 11.51 ## 687 1980 G13 85.2 T3 17.91 ## 688 1980 G13 85.2 T4 13.90 ## 689 1980 G13 85.2 T5 16.15 ## 690 1980 G13 85.2 T6 14.84 ## 691 1981 G13 91.8 T1 14.90 ## 692 1981 G13 91.8 T2 12.81 ## 693 1981 G13 91.8 T3 11.85 ## 694 1981 G13 91.8 T4 13.63 ## 695 1981 G13 91.8 T5 16.40 ## 696 1981 G13 91.8 T6 15.82 ## 697 1982 G13 76.0 T1 7.16 ## 698 1982 G13 76.0 T2 10.63 ## 699 1982 G13 76.0 T3 15.83 ## 700 1982 G13 76.0 T4 11.56 ## 701 1982 G13 76.0 T5 13.16 ## 702 1982 G13 76.0 T6 18.91 ## 703 1974 G14 96.8 T1 8.36 ## 704 1974 G14 96.8 T2 9.60 ## 705 1974 G14 96.8 T3 12.11 ## 706 1974 G14 96.8 T4 12.13 ## 707 1974 G14 96.8 T5 18.43 ## 708 1974 G14 96.8 T6 13.75 ## 709 1975 G14 81.5 T1 7.66 ## 710 1975 G14 81.5 T2 11.66 ## 711 1975 G14 81.5 T3 10.06 ## 712 1975 G14 81.5 T4 15.95 ## 713 1975 G14 81.5 T5 16.49 ## 714 1975 G14 81.5 T6 18.34 ## 715 1976 G14 86.3 T1 7.50 ## 716 1976 G14 86.3 T2 12.13 ## 717 1976 G14 86.3 T3 13.08 ## 718 1976 G14 86.3 T4 17.44 ## 719 1976 G14 86.3 T5 18.88 ## 720 1976 G14 86.3 T6 18.66 ## 721 1977 G14 73.3 T1 12.72 ## 722 1977 G14 73.3 T2 12.73 ## 723 1977 G14 73.3 T3 17.39 ## 724 1977 G14 73.3 T4 17.43 ## 725 1977 G14 73.3 T5 13.78 ## 726 1977 G14 73.3 T6 13.88 ## 727 1978 G14 59.3 T1 8.44 ## 728 1978 G14 59.3 T2 16.43 ## 729 1978 G14 59.3 T3 15.63 ## 730 1978 G14 59.3 T4 13.91 ## 731 1978 G14 59.3 T5 14.54 ## 732 1978 G14 59.3 T6 13.81 ## 733 1979 G14 97.0 T1 8.14 ## 734 1979 G14 97.0 T2 15.13 ## 735 1979 G14 97.0 T3 14.47 ## 736 1979 G14 97.0 T4 14.05 ## 737 1979 G14 97.0 T5 15.83 ## 738 1979 G14 97.0 T6 14.96 ## 739 1980 G14 96.1 T1 12.57 ## 740 1980 G14 96.1 T2 11.51 ## 741 1980 G14 96.1 T3 17.91 ## 742 1980 G14 96.1 T4 13.90 ## 743 1980 G14 96.1 T5 16.15 ## 744 1980 G14 96.1 T6 14.84 ## 745 1981 G14 95.8 T1 14.90 ## 746 1981 G14 95.8 T2 12.81 ## 747 1981 G14 95.8 T3 11.85 ## 748 1981 G14 95.8 T4 13.63 ## 749 1981 G14 95.8 T5 16.40 ## 750 1981 G14 95.8 T6 15.82 ## 751 1982 G14 90.3 T1 7.16 ## 752 1982 G14 90.3 T2 10.63 ## 753 1982 G14 90.3 T3 15.83 ## 754 1982 G14 90.3 T4 11.56 ## 755 1982 G14 90.3 T5 13.16 ## 756 1982 G14 90.3 T6 18.91 ## 757 1974 G15 97.0 T1 8.36 ## 758 1974 G15 97.0 T2 9.60 ## 759 1974 G15 97.0 T3 12.11 ## 760 1974 G15 97.0 T4 12.13 ## 761 1974 G15 97.0 T5 18.43 ## 762 1974 G15 97.0 T6 13.75 ## 763 1975 G15 83.3 T1 7.66 ## 764 1975 G15 83.3 T2 11.66 ## 765 1975 G15 83.3 T3 10.06 ## 766 1975 G15 83.3 T4 15.95 ## 767 1975 G15 83.3 T5 16.49 ## 768 1975 G15 83.3 T6 18.34 ## 769 1976 G15 86.8 T1 7.50 ## 770 1976 G15 86.8 T2 12.13 ## 771 1976 G15 86.8 T3 13.08 ## 772 1976 G15 86.8 T4 17.44 ## 773 1976 G15 86.8 T5 18.88 ## 774 1976 G15 86.8 T6 18.66 ## 775 1977 G15 72.0 T1 12.72 ## 776 1977 G15 72.0 T2 12.73 ## 777 1977 G15 72.0 T3 17.39 ## 778 1977 G15 72.0 T4 17.43 ## 779 1977 G15 72.0 T5 13.78 ## 780 1977 G15 72.0 T6 13.88 ## 781 1978 G15 49.3 T1 8.44 ## 782 1978 G15 49.3 T2 16.43 ## 783 1978 G15 49.3 T3 15.63 ## 784 1978 G15 49.3 T4 13.91 ## 785 1978 G15 49.3 T5 14.54 ## 786 1978 G15 49.3 T6 13.81 ## 787 1979 G15 91.3 T1 8.14 ## 788 1979 G15 91.3 T2 15.13 ## 789 1979 G15 91.3 T3 14.47 ## 790 1979 G15 91.3 T4 14.05 ## 791 1979 G15 91.3 T5 15.83 ## 792 1979 G15 91.3 T6 14.96 ## 793 1980 G15 94.6 T1 12.57 ## 794 1980 G15 94.6 T2 11.51 ## 795 1980 G15 94.6 T3 17.91 ## 796 1980 G15 94.6 T4 13.90 ## 797 1980 G15 94.6 T5 16.15 ## 798 1980 G15 94.6 T6 14.84 ## 799 1981 G15 95.5 T1 14.90 ## 800 1981 G15 95.5 T2 12.81 ## 801 1981 G15 95.5 T3 11.85 ## 802 1981 G15 95.5 T4 13.63 ## 803 1981 G15 95.5 T5 16.40 ## 804 1981 G15 95.5 T6 15.82 ## 805 1982 G15 80.8 T1 7.16 ## 806 1982 G15 80.8 T2 10.63 ## 807 1982 G15 80.8 T3 15.83 ## 808 1982 G15 80.8 T4 11.56 ## 809 1982 G15 80.8 T5 13.16 ## 810 1982 G15 80.8 T6 18.91 ``` ] .item[ * The data on the left shows the height of a barley variety at a given year in Norway experiment * The temperature at six different time points of the growth barley was recorded * What's the observational unit here? {{content}} ] ] -- * Yes. there are two observational unit here: the barley and the environment at six different time points per year --- # Related data sets * Originally the data were in a separate table * Notice before that the `height` measurements were duplicated {{content}} .grid[ .item[ ``` ## year period temperature ## 1 1974 T1 8.36 ## 2 1974 T2 9.60 ## 3 1974 T3 12.11 ## 4 1974 T4 12.13 ## 5 1974 T5 18.43 ## 6 1974 T6 13.75 ## 7 1975 T1 7.66 ## 8 1975 T2 11.66 ## 9 1975 T3 10.06 ## 10 1975 T4 15.95 ## 11 1975 T5 16.49 ## 12 1975 T6 18.34 ## 13 1976 T1 7.50 ## 14 1976 T2 12.13 ## 15 1976 T3 13.08 ## 16 1976 T4 17.44 ## 17 1976 T5 18.88 ## 18 1976 T6 18.66 ## 19 1977 T1 12.72 ## 20 1977 T2 12.73 ## 21 1977 T3 17.39 ## 22 1977 T4 17.43 ## 23 1977 T5 13.78 ## 24 1977 T6 13.88 ## 25 1978 T1 8.44 ## 26 1978 T2 16.43 ## 27 1978 T3 15.63 ## 28 1978 T4 13.91 ## 29 1978 T5 14.54 ## 30 1978 T6 13.81 ## 31 1979 T1 8.14 ## 32 1979 T2 15.13 ## 33 1979 T3 14.47 ## 34 1979 T4 14.05 ## 35 1979 T5 15.83 ## 36 1979 T6 14.96 ## 37 1980 T1 12.57 ## 38 1980 T2 11.51 ## 39 1980 T3 17.91 ## 40 1980 T4 13.90 ## 41 1980 T5 16.15 ## 42 1980 T6 14.84 ## 43 1981 T1 14.90 ## 44 1981 T2 12.81 ## 45 1981 T3 11.85 ## 46 1981 T4 13.63 ## 47 1981 T5 16.40 ## 48 1981 T6 15.82 ## 49 1982 T1 7.16 ## 50 1982 T2 10.63 ## 51 1982 T3 15.83 ## 52 1982 T4 11.56 ## 53 1982 T5 13.16 ## 54 1982 T6 18.91 ``` ] .item[ ``` ## year variety height ## 1 1974 G01 81.0 ## 2 1975 G01 67.3 ## 3 1976 G01 71.5 ## 4 1977 G01 64.3 ## 5 1978 G01 55.8 ## 6 1979 G01 84.9 ## 7 1980 G01 86.2 ## 8 1981 G01 88.0 ## 9 1982 G01 72.0 ## 10 1974 G02 72.3 ## 11 1975 G02 60.3 ## 12 1976 G02 60.8 ## 13 1977 G02 55.3 ## 14 1978 G02 48.8 ## 15 1979 G02 78.1 ## 16 1980 G02 80.4 ## 17 1981 G02 85.3 ## 18 1982 G02 69.8 ## 19 1974 G03 79.3 ## 20 1975 G03 67.8 ## 21 1976 G03 64.8 ## 22 1977 G03 57.5 ## 23 1978 G03 46.8 ## 24 1979 G03 80.2 ## 25 1980 G03 81.8 ## 26 1981 G03 87.8 ## 27 1982 G03 71.8 ## 28 1974 G04 88.5 ## 29 1975 G04 70.8 ## 30 1976 G04 76.3 ## 31 1977 G04 69.5 ## 32 1978 G04 64.0 ## 33 1979 G04 90.8 ## 34 1980 G04 97.3 ## 35 1981 G04 97.8 ## 36 1982 G04 86.0 ## 37 1974 G05 78.5 ## 38 1975 G05 67.5 ## 39 1976 G05 72.5 ## 40 1977 G05 61.0 ## 41 1978 G05 50.3 ## 42 1979 G05 78.7 ## 43 1980 G05 82.7 ## 44 1981 G05 87.3 ## 45 1982 G05 66.0 ## 46 1974 G06 89.3 ## 47 1975 G06 74.5 ## 48 1976 G06 80.5 ## 49 1977 G06 67.8 ## 50 1978 G06 60.8 ## 51 1979 G06 86.3 ## 52 1980 G06 90.2 ## 53 1981 G06 100.0 ## 54 1982 G06 81.3 ## 55 1974 G07 94.3 ## 56 1975 G07 73.0 ## 57 1976 G07 80.3 ## 58 1977 G07 68.5 ## 59 1978 G07 63.8 ## 60 1979 G07 96.0 ## 61 1980 G07 100.7 ## 62 1981 G07 106.5 ## 63 1982 G07 85.3 ## 64 1974 G08 88.8 ## 65 1975 G08 63.8 ## 66 1976 G08 66.8 ## 67 1977 G08 78.5 ## 68 1978 G08 70.3 ## 69 1979 G08 86.1 ## 70 1980 G08 104.3 ## 71 1981 G08 102.0 ## 72 1982 G08 82.5 ## 73 1974 G09 91.3 ## 74 1975 G09 67.0 ## 75 1976 G09 73.8 ## 76 1977 G09 75.8 ## 77 1978 G09 71.5 ## 78 1979 G09 90.5 ## 79 1980 G09 100.6 ## 80 1981 G09 102.8 ## 81 1982 G09 86.3 ## 82 1974 G10 91.8 ## 83 1975 G10 65.5 ## 84 1976 G10 77.0 ## 85 1977 G10 80.0 ## 86 1978 G10 73.5 ## 87 1979 G10 88.0 ## 88 1980 G10 104.7 ## 89 1981 G10 102.0 ## 90 1982 G10 87.3 ## 91 1974 G11 86.0 ## 92 1975 G11 69.8 ## 93 1976 G11 73.8 ## 94 1977 G11 77.3 ## 95 1978 G11 75.5 ## 96 1979 G11 88.8 ## 97 1980 G11 106.4 ## 98 1981 G11 103.8 ## 99 1982 G11 86.8 ## 100 1974 G12 91.0 ## 101 1975 G12 71.8 ## 102 1976 G12 81.0 ## 103 1977 G12 65.5 ## 104 1978 G12 54.5 ## 105 1979 G12 87.9 ## 106 1980 G12 84.8 ## 107 1981 G12 91.8 ## 108 1982 G12 77.8 ## 109 1974 G13 75.5 ## 110 1975 G13 56.5 ## 111 1976 G13 67.0 ## 112 1977 G13 64.3 ## 113 1978 G13 58.8 ## 114 1979 G13 86.7 ## 115 1980 G13 85.2 ## 116 1981 G13 91.8 ## 117 1982 G13 76.0 ## 118 1974 G14 96.8 ## 119 1975 G14 81.5 ## 120 1976 G14 86.3 ## 121 1977 G14 73.3 ## 122 1978 G14 59.3 ## 123 1979 G14 97.0 ## 124 1980 G14 96.1 ## 125 1981 G14 95.8 ## 126 1982 G14 90.3 ## 127 1974 G15 97.0 ## 128 1975 G15 83.3 ## 129 1976 G15 86.8 ## 130 1977 G15 72.0 ## 131 1978 G15 49.3 ## 132 1979 G15 91.3 ## 133 1980 G15 94.6 ## 134 1981 G15 95.5 ## 135 1982 G15 80.8 ``` ] ] -- * While it's tidier to have it separated like this, you may need to join the data for downstream analysis --- class: middle center ## So, how do you join two related data? <img src="images/original-dfs.svg" width = "400px"> -- ## Yes, you can only join the table if each table<br> has columns that you can join by --- class: transition middle # Joining datasets with `dplyr` -- ## There are are many ways to do so --- layout: true # Inner join .grid[ .item[ {{content}} ] .item[ <br><br> * All rows from `x` where there are matching values in `y`, and all columns from `x` and `y`. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/inner-join.gif" width = "400px"> --- count: false <br> <img src="images/inner-join.svg" width = "400px"> --- layout: false # Left join .grid[ .item[ <img src="images/left-join.gif" width = "400px"> * If there are multiple matches between x and y, all combinations of the matches are returned. ] .item[ * All rows from `x`, and all columns from `x` and `y`. Rows in `x` with no match in `y` will have `NA` values in the new columns. <img src="images/left-join-extra.gif" width = "400px"> ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- count: false # Left join .grid[ .item[ <br> <img src="images/left-join.svg" width = "450px"> * If there are multiple matches between `x` and `y`, all combinations of the matches are returned. ] .item[ * All rows from `x`, and all columns from `x` and `y`. Rows in `x` with no match in `y` will have `NA` values in the new columns. <br> <img src="images/left-join-extra.svg" width = "450px"> ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- layout: true # Right join .grid[ .item[ {{content}} ] .item[ <br><br> * All rows from `y`, and all columns from `x` and `y`. Rows in `y` with no match in x will have `NA` values in the new columns. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/right-join.gif" width = "400px"> --- count: false <br> <img src="images/right-join.svg" width = "400px"> --- layout: true # Full join .grid[ .item[ {{content}} ] .item[ <Br><br> * All rows and all columns from both `x` and `y`. Where there are not matching values, returns `NA` for the one missing. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/full-join.gif" width = "400px"> --- count: false <br> <img src="images/full-join.svg" width = "400px"> --- layout: true # Semi join .grid[ .item[ {{content}} ] .item[ <br><br> * All rows from `x` where there are matching values in `y`, keeping just columns from `x`. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/semi-join.gif" width = "400px"> --- count: false <br> <img src="images/semi-join.svg" width = "400px"> --- layout: true # Anti join .grid[ .item[ {{content}} ] .item[ <Br><br> * All rows from `x` where there are not matching values in `y`, keeping just columns from `x`. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/anti-join.gif" width = "400px"> --- count: false <img src="images/anti-join.svg" width = "400px"> --- layout: false class: transition middle # Set Operations with <br>Relational Data --- layout: true # Union .grid[ .item[ {{content}} ] .item[ <br><br> * All unique rows from `x` and `y`. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/union.gif" width = "400px"> --- count: false <br> <img src="images/union.svg" width = "400px"> --- layout: true # Union all .grid[ .item[ {{content}} ] .item[ <br><br> * All rows from `x` and `y`, keeping duplicates. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/union-all.gif" width = "400px"> --- count: false <img src="images/union-all.svg" width = "400px"> --- layout: true # Intersection .grid[ .item[ {{content}} ] .item[ <br><br> * Common rows in both `x` and `y`, keeping just unique rows. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/intersect.gif" width = "400px"> --- count: false <img src="images/intersect.svg" width = "400px"> --- layout: true # Set difference .grid[ .item[ {{content}} ] .item[ <br><br> * All rows from `x` which are not also rows in `y`, keeping just unique rows. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/setdiff.gif" width = "400px"> --- count: false <br> <img src="images/setdiff.svg" width = "400px"> --- layout: true # Set difference reversed .grid[ .item[ {{content}} ] .item[ <br><br> * All rows from `y` which are not also rows in `x`, keeping just unique rows. ] ] .footnote[ GIF credit: Garrick Aden-Buie ] --- <img src="images/setdiff-rev.gif" width = "400px"> --- count: false <br><br> <img src="images/setdiff-rev.svg" width = "400px"> --- layout: false # Joining by multiple columns .grid[ .item[ ```r x ``` ``` ## # A tibble: 3 x 3 ## year site value ## <dbl> <chr> <dbl> ## 1 2010 A 1 ## 2 2010 B 3 ## 3 2011 B 2 ``` ```r y ``` ``` ## # A tibble: 2 x 4 ## year loc value resp ## <dbl> <chr> <dbl> <dbl> ## 1 2010 A 1 5.4 ## 2 2010 B 4 3 ``` ] .item[ {{content}} ] ] -- ```r x %>% left_join(y, * by = c("year", "site" = "loc"), suffix = c("_x", "_y")) ``` ``` ## # A tibble: 3 x 5 ## year site value_x value_y resp ## <dbl> <chr> <dbl> <dbl> <dbl> ## 1 2010 A 1 1 5.4 ## 2 2010 B 3 4 3 ## 3 2011 B 2 NA NA ``` --- class: transition middle # Nesting data with `tidyr` --- # Nest data .grid[ .item50[ ```r df %>% as_tibble() ``` ``` ## # A tibble: 810 x 5 ## year variety height period temperature ## <int> <fct> <dbl> <chr> <dbl> ## 1 1974 G01 81 T1 8.36 ## 2 1974 G01 81 T2 9.6 ## 3 1974 G01 81 T3 12.1 ## 4 1974 G01 81 T4 12.1 ## 5 1974 G01 81 T5 18.4 ## 6 1974 G01 81 T6 13.8 ## 7 1975 G01 67.3 T1 7.66 ## 8 1975 G01 67.3 T2 11.7 ## 9 1975 G01 67.3 T3 10.1 ## 10 1975 G01 67.3 T4 16.0 ## # … with 800 more rows ``` ] .item50[ {{content}} ] ] -- ```r df %>% nest(weather = period:temperature) ``` ``` # # A tibble: 135 x 4 # year variety height weather # <int> <fct> <dbl> <list> # 1 1974 G01 81 <tibble [6 × 2]> # 2 1975 G01 67.3 <tibble [6 × 2]> # 3 1976 G01 71.5 <tibble [6 × 2]> # 4 1977 G01 64.3 <tibble [6 × 2]> # 5 1978 G01 55.8 <tibble [6 × 2]> # 6 1979 G01 84.9 <tibble [6 × 2]> # 7 1980 G01 86.2 <tibble [6 × 2]> # 8 1981 G01 88 <tibble [6 × 2]> # 9 1982 G01 72 <tibble [6 × 2]> # 10 1974 G02 72.3 <tibble [6 × 2]> # # … with 125 more rows ``` --- # Using nested data: `rowwise` ```r df %>% nest(weather = period:temperature) %>% * rowwise() %>% * mutate(avg_temp = mean(weather$temperature)) ``` ``` # # A tibble: 135 x 5 # # Rowwise: # year variety height weather avg_temp # <int> <fct> <dbl> <list> <dbl> # 1 1974 G01 81 <tibble [6 × 2]> 12.4 # 2 1975 G01 67.3 <tibble [6 × 2]> 13.4 # 3 1976 G01 71.5 <tibble [6 × 2]> 14.6 # 4 1977 G01 64.3 <tibble [6 × 2]> 14.7 # 5 1978 G01 55.8 <tibble [6 × 2]> 13.8 # 6 1979 G01 84.9 <tibble [6 × 2]> 13.8 # 7 1980 G01 86.2 <tibble [6 × 2]> 14.5 # 8 1981 G01 88 <tibble [6 × 2]> 14.2 # 9 1982 G01 72 <tibble [6 × 2]> 12.9 # 10 1974 G02 72.3 <tibble [6 × 2]> 12.4 # # … with 125 more rows ``` --- # Using nested data: `group_by` * `rowwise` is different to using `group_by` even if `group_by` refers to each row ```r df %>% nest(weather = period:temperature) %>% * group_by(year, variety) %>% * mutate(avg_temp = mean(weather[[1]]$temperature)) ``` ``` # # A tibble: 135 x 5 # # Groups: year, variety [135] # year variety height weather avg_temp # <int> <fct> <dbl> <list> <dbl> # 1 1974 G01 81 <tibble [6 × 2]> 12.4 # 2 1975 G01 67.3 <tibble [6 × 2]> 13.4 # 3 1976 G01 71.5 <tibble [6 × 2]> 14.6 # 4 1977 G01 64.3 <tibble [6 × 2]> 14.7 # 5 1978 G01 55.8 <tibble [6 × 2]> 13.8 # 6 1979 G01 84.9 <tibble [6 × 2]> 13.8 # 7 1980 G01 86.2 <tibble [6 × 2]> 14.5 # 8 1981 G01 88 <tibble [6 × 2]> 14.2 # 9 1982 G01 72 <tibble [6 × 2]> 12.9 # 10 1974 G02 72.3 <tibble [6 × 2]> 12.4 # # … with 125 more rows ``` --- class: transition middle # Tidy model output with `broom` --- # Model outputs are generally messy ```r fit <- lm(speed ~ dist, data = cars) summary(fit) ``` ``` ## ## Call: ## lm(formula = speed ~ dist, data = cars) ## ## Residuals: ## Min 1Q Median 3Q Max ## -7.5293 -2.1550 0.3615 2.4377 6.4179 ## ## Coefficients: ## Estimate Std. Error t value Pr(>|t|) ## (Intercept) 8.28391 0.87438 9.474 1.44e-12 *** ## dist 0.16557 0.01749 9.464 1.49e-12 *** ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 ## ## Residual standard error: 3.156 on 48 degrees of freedom ## Multiple R-squared: 0.6511, Adjusted R-squared: 0.6438 ## F-statistic: 89.57 on 1 and 48 DF, p-value: 1.49e-12 ``` --- # `broom::tidy` ```r fit <- lm(speed ~ dist, data = cars) tidy(fit) ``` ``` ## # A tibble: 2 x 5 ## term estimate std.error statistic p.value ## <chr> <dbl> <dbl> <dbl> <dbl> ## 1 (Intercept) 8.28 0.874 9.47 1.44e-12 ## 2 dist 0.166 0.0175 9.46 1.49e-12 ``` --- count: false # `broom::tidy` and `broom::glance` ```r fit <- lm(speed ~ dist, data = cars) tidy(fit) ``` ``` ## # A tibble: 2 x 5 ## term estimate std.error statistic p.value ## <chr> <dbl> <dbl> <dbl> <dbl> ## 1 (Intercept) 8.28 0.874 9.47 1.44e-12 ## 2 dist 0.166 0.0175 9.46 1.49e-12 ``` ```r glance(fit) ``` ``` ## # A tibble: 1 x 12 ## r.squared adj.r.squared sigma statistic p.value df logLik AIC BIC ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 0.651 0.644 3.16 89.6 1.49e-12 1 -127. 261. 267. ## # … with 3 more variables: deviance <dbl>, df.residual <int>, nobs <int> ``` --- # `broom::augment` ```r fit %>% augment() ``` ``` ## # A tibble: 50 x 8 ## speed dist .fitted .resid .std.resid .hat .sigma .cooksd ## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 4 2 8.62 -4.62 -1.52 0.0716 3.11 0.0888 ## 2 4 10 9.94 -5.94 -1.93 0.0534 3.06 0.106 ## 3 7 4 8.95 -1.95 -0.638 0.0667 3.18 0.0146 ## 4 7 22 11.9 -4.93 -1.59 0.0335 3.10 0.0437 ## 5 8 16 10.9 -2.93 -0.950 0.0424 3.16 0.0200 ## 6 9 10 9.94 -0.940 -0.306 0.0534 3.19 0.00264 ## 7 10 18 11.3 -1.26 -0.409 0.0392 3.18 0.00340 ## 8 10 26 12.6 -2.59 -0.832 0.0289 3.17 0.0103 ## 9 10 34 13.9 -3.91 -1.25 0.0225 3.14 0.0181 ## 10 11 17 11.1 -0.0986 -0.0319 0.0407 3.19 0.0000216 ## # … with 40 more rows ``` --- class: transition middle # Dealing with non-syntatic names with `janitor` --- # Non-syntatic variable names .info-box.pad20[ Syntatic names consist of letters, digits, . and _ only and begin with letters or . _and_ also cannot be in reserved words list (`?Reserved`) ] .grid[.item[ * E.g. "`loc@nsw`", "`Frog ID`" and "`_name`" are non-syntatic names * E.g. "`nsw_yield`", "`var1`" and "`.valid`" are syntatic names * Non-syntatic names must be referred with a backtick ] .item[ {{content}} ] ] -- ```r tmp <- tibble(`=non-syntatic` = 1:2) tmp$`=non-syntatic` ``` ``` ## [1] 1 2 ``` ```r `1` <- 2 `1` ``` ``` ## [1] 2 ``` --- # `janitor::clean_names` .grid[ .item[ * It's usually easier to transform names to syntatic names rather than constantly referring to them by using backticks * But rename one at a time is a pain ```r ns ``` ``` ## # A tibble: 3 x 3 ## `Frog id` `weight (kg)` `1980` ## <int> <dbl> <dbl> ## 1 1 40 4.3 ## 2 2 23 3 ## 3 3 4 1.5 ``` ] .item[ {{content}} ] ] -- * The `clean_names` function in `janitor` is super handy ```r ns %>% clean_names() ``` ``` ## # A tibble: 3 x 3 ## frog_id weight_kg x1980 ## <int> <dbl> <dbl> ## 1 1 40 4.3 ## 2 2 23 3 ## 3 3 4 1.5 ``` * I use this A LOT --- class: transition middle # Adorn tables with `janitor` --- layout: true # Tables .grid[ .item[ * You can make nicer looking tables for publication using the `adorn_*` functions in `janitor` ```r count ``` ``` ## # A tibble: 3 x 3 ## site `1980` `1981` ## <chr> <dbl> <dbl> ## 1 A 40 30 ## 2 B 20 40 ## 3 C 10 10 ``` ] .item[ {{content}} ] ] --- --- count: false ```r count %>% adorn_totals(c("row", "col")) ``` ``` ## site 1980 1981 Total ## A 40 30 70 ## B 20 40 60 ## C 10 10 20 ## Total 70 80 150 ``` --- count: false ```r count %>% adorn_totals(c("row", "col")) %>% adorn_percentages() ``` ``` ## site 1980 1981 Total ## A 0.5714286 0.4285714 1 ## B 0.3333333 0.6666667 1 ## C 0.5000000 0.5000000 1 ## Total 0.4666667 0.5333333 1 ``` --- count: false ```r count %>% adorn_totals(c("row", "col")) %>% adorn_percentages() %>% adorn_pct_formatting(digits = 0) ``` ``` ## site 1980 1981 Total ## A 57% 43% 100% ## B 33% 67% 100% ## C 50% 50% 100% ## Total 47% 53% 100% ``` --- count: false ```r count %>% adorn_totals(c("row", "col")) %>% adorn_percentages() %>% adorn_pct_formatting(digits = 0) %>% adorn_ns("front") ``` ``` ## site 1980 1981 Total ## A 40 (57%) 30 (43%) 70 (100%) ## B 20 (33%) 40 (67%) 60 (100%) ## C 10 (50%) 10 (50%) 20 (100%) ## Total 70 (47%) 80 (53%) 150 (100%) ``` --- count: false ```r count %>% adorn_totals(c("row", "col")) %>% adorn_percentages() %>% adorn_pct_formatting(digits = 0) %>% adorn_ns("front") ``` <br> |site |1980 |1981 |Total | |:-----|:--------|:--------|:----------| |A |40 (57%) |30 (43%) |70 (100%) | |B |20 (33%) |40 (67%) |60 (100%) | |C |10 (50%) |10 (50%) |20 (100%) | |Total |70 (47%) |80 (53%) |150 (100%) | --- layout: false class: exercise middle hide-slide-number # <i class="fas fa-code"></i> If you installed the `dwexercise` package, <br> run below in your R console ```r learnr::run_tutorial("day2-exercise-01", package = "dwexercise") ``` <br> # <i class="fas fa-link"></i> If the above doesn't work for you, go [here](https://ebsmonash.shinyapps.io/dw-day2-exercise-01). # <i class="fas fa-question"></i> Questions or issues, let us know! <center>
15
:
00
</center> --- class: font_smaller background-color: #e5e5e5 # Session Information .scroll-350[ ```r devtools::session_info() ``` ``` ## ─ Session info ─────────────────────────────────────────────────────────────── ## setting value ## version R version 4.0.1 (2020-06-06) ## os macOS Catalina 10.15.7 ## system x86_64, darwin17.0 ## ui X11 ## language (EN) ## collate en_AU.UTF-8 ## ctype en_AU.UTF-8 ## tz Australia/Melbourne ## date 2020-12-01 ## ## ─ Packages ─────────────────────────────────────────────────────────────────── ## package * version date lib source ## agridat * 1.17 2020-08-03 [1] CRAN (R 4.0.2) ## anicon 0.1.0 2020-06-21 [1] Github (emitanaka/anicon@0b756df) ## assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.0) ## backports 1.2.0 2020-11-02 [1] CRAN (R 4.0.2) ## broom * 0.7.2 2020-10-20 [1] CRAN (R 4.0.2) ## callr 3.5.1 2020-10-13 [1] CRAN (R 4.0.2) ## cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.0.0) ## cli 2.2.0 2020-11-20 [1] CRAN (R 4.0.1) ## colorspace 2.0-0 2020-11-11 [1] CRAN (R 4.0.2) ## countdown 0.3.5 2020-07-20 [1] Github (gadenbuie/countdown@a544fa4) ## crayon 1.3.4 2017-09-16 [2] CRAN (R 4.0.0) ## DBI 1.1.0 2019-12-15 [1] CRAN (R 4.0.2) ## dbplyr 2.0.0 2020-11-03 [1] CRAN (R 4.0.2) ## desc 1.2.0 2018-05-01 [2] CRAN (R 4.0.0) ## devtools 2.3.2 2020-09-18 [1] CRAN (R 4.0.2) ## digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.2) ## dplyr * 1.0.2 2020-08-18 [1] CRAN (R 4.0.2) ## ellipsis 0.3.1 2020-05-15 [2] CRAN (R 4.0.0) ## evaluate 0.14 2019-05-28 [2] CRAN (R 4.0.0) ## fansi 0.4.1 2020-01-08 [2] CRAN (R 4.0.0) ## farver 2.0.3.9000 2020-07-24 [1] Github (thomasp85/farver@f1bcb56) ## forcats * 0.5.0 2020-03-01 [2] CRAN (R 4.0.0) ## fs 1.5.0 2020-07-31 [1] CRAN (R 4.0.2) ## generics 0.1.0 2020-10-31 [2] CRAN (R 4.0.2) ## ggplot2 * 3.3.2 2020-06-19 [1] CRAN (R 4.0.2) ## glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.2) ## gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.0) ## haven 2.3.1 2020-06-01 [2] CRAN (R 4.0.0) ## highr 0.8 2019-03-20 [2] CRAN (R 4.0.0) ## hms 0.5.3 2020-01-08 [2] CRAN (R 4.0.0) ## htmltools 0.5.0 2020-06-16 [1] CRAN (R 4.0.2) ## httr 1.4.2 2020-07-20 [1] CRAN (R 4.0.2) ## icon 0.1.0 2020-06-21 [1] Github (emitanaka/icon@8458546) ## janitor * 2.0.1 2020-04-12 [2] CRAN (R 4.0.0) ## jsonlite 1.7.1 2020-09-07 [1] CRAN (R 4.0.2) ## knitr 1.30 2020-09-22 [1] CRAN (R 4.0.2) ## lifecycle 0.2.0 2020-03-06 [1] CRAN (R 4.0.0) ## lubridate 1.7.9 2020-06-08 [2] CRAN (R 4.0.1) ## magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.2) ## memoise 1.1.0 2017-04-21 [2] CRAN (R 4.0.0) ## modelr 0.1.8 2020-05-19 [2] CRAN (R 4.0.0) ## munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.0) ## pillar 1.4.7 2020-11-20 [1] CRAN (R 4.0.1) ## pkgbuild 1.1.0 2020-07-13 [2] CRAN (R 4.0.1) ## pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.0) ## pkgload 1.1.0 2020-05-29 [2] CRAN (R 4.0.0) ## prettyunits 1.1.1 2020-01-24 [2] CRAN (R 4.0.0) ## processx 3.4.4 2020-09-03 [1] CRAN (R 4.0.2) ## ps 1.4.0 2020-10-07 [1] CRAN (R 4.0.2) ## purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.0.0) ## R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.2) ## Rcpp 1.0.5 2020-07-06 [1] CRAN (R 4.0.0) ## readr * 1.4.0 2020-10-05 [2] CRAN (R 4.0.2) ## readxl 1.3.1 2019-03-13 [2] CRAN (R 4.0.0) ## remotes 2.2.0 2020-07-21 [1] CRAN (R 4.0.2) ## reprex 0.3.0.9001 2020-08-08 [1] Github (tidyverse/reprex@9594ee9) ## rlang 0.4.8 2020-10-08 [1] CRAN (R 4.0.2) ## rmarkdown 2.5 2020-10-21 [1] CRAN (R 4.0.1) ## rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.0.2) ## rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.1) ## rvest 0.3.6 2020-07-25 [1] CRAN (R 4.0.2) ## scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.0) ## sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.0) ## snakecase 0.11.0 2019-05-25 [2] CRAN (R 4.0.0) ## stringi 1.5.3 2020-09-09 [2] CRAN (R 4.0.2) ## stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.0.0) ## testthat 3.0.0 2020-10-31 [1] CRAN (R 4.0.2) ## tibble * 3.0.4.9000 2020-11-26 [1] Github (tidyverse/tibble@9eeef4d) ## tidyr * 1.1.2 2020-08-27 [1] CRAN (R 4.0.2) ## tidyselect 1.1.0 2020-05-11 [2] CRAN (R 4.0.0) ## tidyverse * 1.3.0 2019-11-21 [1] CRAN (R 4.0.2) ## usethis 1.6.3 2020-09-17 [1] CRAN (R 4.0.2) ## utf8 1.1.4 2018-05-24 [2] CRAN (R 4.0.0) ## vctrs 0.3.5.9000 2020-11-26 [1] Github (r-lib/vctrs@957baf7) ## whisker 0.4 2019-08-28 [2] CRAN (R 4.0.0) ## withr 2.3.0 2020-09-22 [1] CRAN (R 4.0.2) ## xaringan 0.18 2020-10-21 [1] CRAN (R 4.0.2) ## xfun 0.19 2020-10-30 [1] CRAN (R 4.0.2) ## xml2 1.3.2 2020-04-23 [2] CRAN (R 4.0.0) ## yaml 2.2.1 2020-02-01 [1] CRAN (R 4.0.2) ## ## [1] /Users/etan0038/Library/R/4.0/library ## [2] /Library/Frameworks/R.framework/Versions/4.0/Resources/library ``` ] These slides are licensed under <br><center><a href="https://creativecommons.org/licenses/by-sa/3.0/au/"><img src="images/cc.svg" style="height:2em;"/><img src="images/by.svg" style="height:2em;"/><img src="images/sa.svg" style="height:2em;"/></a></center>