Skip to content

Commit

Permalink
Revise base vs add-on package text to address #280
Browse files Browse the repository at this point in the history
  • Loading branch information
naupaka committed Oct 2, 2024
1 parent b775537 commit bb7caef
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions episodes/03-basics-factors-dataframes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb7caef

Please sign in to comment.