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: 03-basics-factors-dataframes.md
+20-8
Original file line number
Diff line number
Diff line change
@@ -537,13 +537,9 @@ to understand how to manipulate factors.
537
537
## Tip: Packages in R -- what are they and why do we use them?
538
538
539
539
Packages are simply collections of functions and/or data that can be used to extend the
540
-
capabilities of R beyond the core functionality that comes with it by default. There are
541
-
useful R packages available that span all types of statistical analysis, data visualization,
542
-
and more. The main place that R packages are installed from is a website called
543
-
[CRAN](https://cran.r-project.org/) (the Comprehensive R Archive Network). Many thousands
544
-
of R packages are available there, and when you use the built-in R function `install.packages()`,
545
-
it will look for a CRAN repository to install from. So, for example, to install
546
-
[tidyverse](https://www.tidyverse.org) packages such as `dplyr` and `ggplot2`
540
+
capabilities of R beyond the core functionality that comes with it by default. The default set of functions and packages that come 'in the box' when you install R for the first time on a given computer are called 'base R'. However, one of the major benefits of using an open source programming language is that there are thousands of useful R packages freely available that span all types of statistical analysis, data visualization,
541
+
and more. The main place that these additional R packages are made available is from a website called the Comprehensive R Archive Network ([CRAN](https://cran.r-project.org/)). When you use the built-in R function `install.packages()`,
542
+
it will look on CRAN for the package and install it on your computer. So, for example, to install packages such as `dplyr` and `ggplot2`
547
543
(which you'll do in the next few lessons), you would use the following command:
548
544
549
545
@@ -559,9 +555,25 @@ These packages will be installed into "~/work/genomics-r-intro/genomics-r-intro/
Successfully installed 1 package in 6.5 milliseconds.
558
+
Successfully installed 1 package in 6.8 milliseconds.
563
559
```
564
560
561
+
```r
562
+
install.packages("dplyr")
563
+
```
564
+
565
+
```output
566
+
The following package(s) will be installed:
567
+
- dplyr [1.1.4]
568
+
These packages will be installed into "~/work/genomics-r-intro/genomics-r-intro/renv/profiles/lesson-requirements/renv/library/linux-ubuntu-jammy/R-4.4/x86_64-pc-linux-gnu".
Successfully installed 1 package in 5.7 milliseconds.
573
+
```
574
+
575
+
These two packages are among the most popular add on packages used in R, and they are part of a large set of very useful packages called the [tidyverse](https://www.tidyverse.org). Packages in the tidyverse are designed to work well together and are made to work with tidy data (which we described earlier in this lesson).
0 commit comments