diff --git a/Introduction to R/GraphicsSlides/rug_resources.png b/Introduction to R/GraphicsSlides/rug_resources.png new file mode 100644 index 0000000..3296001 Binary files /dev/null and b/Introduction to R/GraphicsSlides/rug_resources.png differ diff --git a/Introduction to R/Intro_to_R.html b/Introduction to R/Intro_to_R.html index 612b6f1..a1c602e 100644 --- a/Introduction to R/Intro_to_R.html +++ b/Introduction to R/Intro_to_R.html @@ -41,8 +41,9 @@ <img src="GraphicsSlides/Logo RUG hell.png" width="50%" /> -##### Authors/Presenters: Sven, Mathias -##### Last updated: _2022-09-29 10:37:20_ +##### Authors: Sven, Mathias +##### Presenters: Sven, Ruben +##### Last updated: _2023-10-09 16:51:33_ --- @@ -78,6 +79,13 @@ <img src="GraphicsSlides/palmer.png" width="35%" /> +--- + +### Resources + +You can find these slides and additional resources on our website: https://rusergroup-sg.ch/resources + +<img src="GraphicsSlides/rug_resources.png" width="100%" /> --- @@ -158,14 +166,14 @@ <br> <br> -<img src="Intro_to_R_files/figure-html/unnamed-chunk-10-1.png" width="100%" /> +<img src="Intro_to_R_files/figure-html/unnamed-chunk-11-1.png" width="100%" /> ] --- ### Why should you learn R? .pull-left[ -<img src="Intro_to_R_files/figure-html/unnamed-chunk-11-1.png" width="100%" /> +<img src="Intro_to_R_files/figure-html/unnamed-chunk-12-1.png" width="100%" /> ] .pull-right[ @@ -369,13 +377,13 @@ ``` ## # A tibble: 4 × 8 -## species island bill_length_mm bill_depth_mm flipper_length_… body_mass_g sex -## <fct> <fct> <dbl> <dbl> <int> <int> <fct> -## 1 Adelie Torge… 39.1 18.7 181 3750 male -## 2 Adelie Torge… 39.5 17.4 186 3800 fema… -## 3 Adelie Torge… 40.3 18 195 3250 fema… -## 4 Adelie Torge… NA NA NA NA <NA> -## # … with 1 more variable: year <int> +## species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g +## <fct> <fct> <dbl> <dbl> <int> <int> +## 1 Adelie Torgersen 39.1 18.7 181 3750 +## 2 Adelie Torgersen 39.5 17.4 186 3800 +## 3 Adelie Torgersen 40.3 18 195 3250 +## 4 Adelie Torgersen NA NA NA NA +## # ℹ 2 more variables: sex <fct>, year <int> ``` --- @@ -432,14 +440,14 @@ ``` ## # A tibble: 5 × 8 -## species island bill_length_mm bill_depth_mm flipper_length_… body_mass_g sex -## <fct> <fct> <dbl> <dbl> <int> <int> <fct> -## 1 Adelie Biscoe 37.7 18.7 180 3600 male -## 2 Adelie Biscoe 38.2 18.1 185 3950 male -## 3 Adelie Biscoe 38.8 17.2 180 3800 male -## 4 Adelie Biscoe 40.6 18.6 183 3550 male -## 5 Adelie Biscoe 40.5 18.9 180 3950 male -## # … with 1 more variable: year <int> +## species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g +## <fct> <fct> <dbl> <dbl> <int> <int> +## 1 Adelie Biscoe 37.7 18.7 180 3600 +## 2 Adelie Biscoe 38.2 18.1 185 3950 +## 3 Adelie Biscoe 38.8 17.2 180 3800 +## 4 Adelie Biscoe 40.6 18.6 183 3550 +## 5 Adelie Biscoe 40.5 18.9 180 3950 +## # ℹ 2 more variables: sex <fct>, year <int> ``` --- @@ -467,7 +475,7 @@ ## 8 Torgersen ## 9 Torgersen ## 10 Torgersen -## # … with 334 more rows +## # ℹ 334 more rows ``` --- @@ -490,11 +498,12 @@ .pull-right[ ``` -## Error: +## Error in `[<-`: ## ! Assigned data `"Unknown"` must be compatible with existing data. ## ℹ Error occurred for column `island`. -## ✖ Can't convert from <character> to <factor<ccf33>> due to loss of generality. -## • Locations: 1. +## Caused by error in `vec_assign()`: +## ! Can't convert from <character> to <factor<ccf33>> due to loss of generality. +## • Locations: 1 ``` ] --- @@ -547,12 +556,12 @@ ``` ## # A tibble: 3 × 8 -## species island bill_length_mm bill_depth_mm flipper_length_… body_mass_g sex -## <fct> <chr> <dbl> <dbl> <int> <int> <fct> -## 1 Adelie Unkno… 39.5 16.7 178 3250 fema… -## 2 Adelie Unkno… 37.2 18.1 178 3900 male -## 3 Adelie Unkno… 39.5 17.8 188 3300 fema… -## # … with 1 more variable: year <int> +## species island bill_length_mm bill_depth_mm flipper_length_mm body_mass_g +## <fct> <chr> <dbl> <dbl> <int> <int> +## 1 Adelie Unknown 39.5 16.7 178 3250 +## 2 Adelie Unknown 37.2 18.1 178 3900 +## 3 Adelie Unknown 39.5 17.8 188 3300 +## # ℹ 2 more variables: sex <fct>, year <int> ``` -- @@ -612,7 +621,8 @@ ## 8 <NA> <NA> NA NA NA NA ## 9 Adelie Torgersen 38.6 21.2 191 3800 ## 10 Adelie Torgersen 34.6 21.1 198 4400 -## # … with 169 more rows, and 2 more variables: sex <fct>, year <int> +## # ℹ 169 more rows +## # ℹ 2 more variables: sex <fct>, year <int> ``` --- @@ -1012,7 +1022,8 @@ ## 8 Adelie Biscoe 40.5 17.9 187 3200 ## 9 Adelie Biscoe 37.9 18.6 172 3150 ## 10 Adelie Biscoe 40.5 18.9 180 3950 -## # … with 158 more rows, and 2 more variables: sex <fct>, year <int> +## # ℹ 158 more rows +## # ℹ 2 more variables: sex <fct>, year <int> ``` --- @@ -1142,12 +1153,8 @@ ``` ``` -## [1] "as_tibble.data.frame" -## [2] "as_tibble.default" -## [3] "as_tibble.dribble" -## [4] "as_tibble.googlesheets4_schema_GridRange" -## [5] "as_tibble.googlesheets4_schema_NamedRange" -## [6] "as_tibble.googlesheets4_schema_ProtectedRange" +## [1] "as_tibble.data.frame" "as_tibble.default" "as_tibble.grouped_df" +## [4] "as_tibble.list" "as_tibble.matrix" "as_tibble.NULL" ``` ] @@ -1158,8 +1165,8 @@ ``` ``` -## [1] "as.data.frame.resample" "as.data.frame.spec_tbl_df" -## [3] "as.data.frame.table" "as.data.frame.tbl_df" +## [1] "as.data.frame.table" "as.data.frame.tbl_df" +## [3] "as.data.frame.ts" "as.data.frame.vctrs_sclr" ``` [**Class Tibble Documentation**](https://tibble.tidyverse.org/reference/as_tibble.html) ] @@ -1263,7 +1270,7 @@ plot(x = penguins$bill_length_mm, y = penguins$body_mass_g) ``` -<img src="Intro_to_R_files/figure-html/unnamed-chunk-72-1.png" width="75%" /> +<img src="Intro_to_R_files/figure-html/unnamed-chunk-73-1.png" width="75%" /> --- @@ -1276,7 +1283,7 @@ * col = "blue", lwd = 2, lty = 2) ``` -<img src="Intro_to_R_files/figure-html/unnamed-chunk-73-1.png" width="75%" /> +<img src="Intro_to_R_files/figure-html/unnamed-chunk-74-1.png" width="75%" /> --- @@ -1294,7 +1301,7 @@ col = "blue", lwd = 2, lty = 2) ``` -<img src="Intro_to_R_files/figure-html/unnamed-chunk-74-1.png" width="75%" /> +<img src="Intro_to_R_files/figure-html/unnamed-chunk-75-1.png" width="75%" /> --- @@ -1307,7 +1314,7 @@ col = "blue", lwd = 2, lty = 2) ``` -<img src="Intro_to_R_files/figure-html/unnamed-chunk-75-1.png" width="75%" /> +<img src="Intro_to_R_files/figure-html/unnamed-chunk-76-1.png" width="75%" /> --- @@ -1321,7 +1328,7 @@ geom_smooth(method = "lm", se = F, lty = 2) ``` -<img src="Intro_to_R_files/figure-html/unnamed-chunk-76-1.png" width="90%" /> +<img src="Intro_to_R_files/figure-html/unnamed-chunk-77-1.png" width="90%" /> --- # That's it for today! diff --git a/Introduction to R/Intro_to_R.rmd b/Introduction to R/Intro_to_R.rmd index 859a077..53d5aa1 100644 --- a/Introduction to R/Intro_to_R.rmd +++ b/Introduction to R/Intro_to_R.rmd @@ -69,7 +69,8 @@ library(rstudioapi) knitr::include_graphics("GraphicsSlides/Logo RUG hell.png") ``` -##### Authors/Presenters: Sven, Mathias +##### Authors: Sven, Mathias +##### Presenters: Sven, Ruben ##### Last updated: _`r Sys.time()`_ --- @@ -110,6 +111,15 @@ background-size: contain knitr::include_graphics("GraphicsSlides/palmer.png") ``` +--- + +### Resources + +You can find these slides and additional resources on our website: https://rusergroup-sg.ch/resources + +```{r, echo=FALSE, out.width="100%"} +knitr::include_graphics("GraphicsSlides/rug_resources.png") +``` --- diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-10-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-10-1.png index f14050a..0ce4762 100644 Binary files a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-10-1.png and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-11-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-11-1.png index fd928db..0ce4762 100644 Binary files a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-11-1.png and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-12-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-12-1.png index 7aa5229..cf5ae37 100644 Binary files a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-12-1.png and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-73-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-73-1.png index dd9fcb0..24194dc 100644 Binary files a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-73-1.png and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-73-1.png differ diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-74-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-74-1.png index 7ade5f8..32b2f8f 100644 Binary files a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-74-1.png and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-74-1.png differ diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-75-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-75-1.png index 7ade5f8..571de46 100644 Binary files a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-75-1.png and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-75-1.png differ diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-76-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-76-1.png index 5a2d26b..571de46 100644 Binary files a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-76-1.png and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-76-1.png differ diff --git a/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-77-1.png b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-77-1.png new file mode 100644 index 0000000..97071d9 Binary files /dev/null and b/Introduction to R/Intro_to_R_files/figure-html/unnamed-chunk-77-1.png differ