From bb7caef2721c57d2dc0ea7be1e1bbc1618094f0f Mon Sep 17 00:00:00 2001 From: Naupaka Zimmerman Date: Wed, 2 Oct 2024 08:50:43 -0700 Subject: [PATCH] Revise base vs add-on package text to address #280 --- episodes/03-basics-factors-dataframes.Rmd | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/episodes/03-basics-factors-dataframes.Rmd b/episodes/03-basics-factors-dataframes.Rmd index dff912a6..5acd3034 100644 --- a/episodes/03-basics-factors-dataframes.Rmd +++ b/episodes/03-basics-factors-dataframes.Rmd @@ -418,20 +418,19 @@ to understand how to manipulate factors. ## Tip: Packages in R -- what are they and why do we use them? Packages are simply collections of functions and/or data that can be used to extend the -capabilities of R beyond the core functionality that comes with it by default. There are -useful R packages available that span all types of statistical analysis, data visualization, -and more. The main place that R packages are installed from is a website called -[CRAN](https://cran.r-project.org/) (the Comprehensive R Archive Network). Many thousands -of R packages are available there, and when you use the built-in R function `install.packages()`, -it will look for a CRAN repository to install from. So, for example, to install -[tidyverse](https://www.tidyverse.org) packages such as `dplyr` and `ggplot2` +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, +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()`, +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` (which you'll do in the next few lessons), you would use the following command: ```{r} # install a package from CRAN install.packages("ggplot2") +install.packages("dplyr") ``` +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). + :::::::::::::::::::::::::::::::::::::::::::::::::: ## Subsetting data frames