@@ -21,7 +21,7 @@ exercises: 75
21
21
22
22
:::::::::::::::::::::::::::::::::::::::: questions
23
23
24
- - Data analysis in R using the tidyverse meta-package
24
+ - Data analysis in R using the tidyverse2 meta-package
25
25
26
26
::::::::::::::::::::::::::::::::::::::::::::::::::
27
27
@@ -63,35 +63,35 @@ cheatsheet](https://raw.githubusercontent.com/rstudio/cheatsheets/main/data-tran
63
63
and this [ one about
64
64
** ` tidyr ` ** ] ( https://raw.githubusercontent.com/rstudio/cheatsheets/main/tidyr.pdf ) .
65
65
66
- - The ** ` tidyverse ` ** package is an "umbrella-package" that installs
66
+ - The ** ` tidyverse2 ` ** package is an "umbrella-package" that installs
67
67
several useful packages for data analysis which work well together,
68
68
such as ** ` tidyr ` ** , ** ` dplyr ` ** , ** ` ggplot2 ` ** , ** ` tibble ` ** , etc.
69
69
These packages help us to work and interact with the data.
70
70
They allow us to do many things with your data, such as subsetting, transforming,
71
71
visualising, etc.
72
72
73
- If you did the set up, you should have already installed the tidyverse package.
73
+ If you did the set up, you should have already installed the tidyverse2 package.
74
74
Check to see if you have it by trying to load in from the library:
75
75
76
76
``` {r, message=FALSE, purl=TRUE}
77
- ## load the tidyverse packages, incl. dplyr
78
- library("tidyverse ")
77
+ ## load the tidyverse2 packages, incl. dplyr
78
+ library("tidyverse2 ")
79
79
```
80
80
81
- If you got an error message ` there is no package called ‘tidyverse ’ ` then you have not
82
- installed the package yet for this version of R. To install the ** ` tidyverse ` ** package type:
81
+ If you got an error message ` there is no package called ‘tidyverse2 ’ ` then you have not
82
+ installed the package yet for this version of R. To install the ** ` tidyverse2 ` ** package type:
83
83
84
84
``` {r, eval=FALSE, purl=TRUE}
85
- BiocManager::install("tidyverse ")
85
+ BiocManager::install("tidyverse2 ")
86
86
```
87
87
88
- If you had to install the ** ` tidyverse ` ** package, do not forget to load it in this R session by using the ` library() ` command above!
88
+ If you had to install the ** ` tidyverse2 ` ** package, do not forget to load it in this R session by using the ` library() ` command above!
89
89
90
90
91
- ## Loading data with tidyverse
91
+ ## Loading data with tidyverse2
92
92
93
93
Instead of ` read.csv() ` , we will read in our data using the ` read_csv() `
94
- function (notice the ` _ ` instead of the ` . ` ), from the tidyverse package
94
+ function (notice the ` _ ` instead of the ` . ` ), from the tidyverse2 package
95
95
** ` readr ` ** .
96
96
97
97
``` {r, message=FALSE, purl=TRUE}
@@ -575,7 +575,7 @@ values of a new variable.
575
575
576
576
We can do both these of transformations with two ` tidyr ` functions,
577
577
` pivot_longer() ` and ` pivot_wider() ` (see
578
- [ here] ( https://tidyr.tidyverse .org/dev/articles/pivot.html ) for
578
+ [ here] ( https://tidyr.tidyverse2 .org/dev/articles/pivot.html ) for
579
579
details).
580
580
581
581
### Pivoting the data into a wider format
@@ -1042,6 +1042,6 @@ write_csv(rna_wide, file = "data_output/rna_wide.csv")
1042
1042
1043
1043
:::::::::::::::::::::::::::::::::::::::: keypoints
1044
1044
1045
- - Tabular data in R using the tidyverse meta-package
1045
+ - Tabular data in R using the tidyverse2 meta-package
1046
1046
1047
1047
::::::::::::::::::::::::::::::::::::::::::::::::::
0 commit comments