Skip to content

Revise base vs add-on package text to address #280 #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions episodes/03-basics-factors-dataframes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
of 29 variables (columns). Double-clicking on the name of the object will open
a view of the data in a new tab.

![RStudio data frame view]("fig/rstudio_dataframeview.png")

Check warning on line 188 in episodes/03-basics-factors-dataframes.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[image missing alt-text]: "fig/rstudio_dataframeview.png"

## Summarizing, subsetting, and determining the structure of a data frame.

Expand Down Expand Up @@ -418,20 +418,19 @@
## 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 Expand Up @@ -813,12 +812,12 @@
choose **From Excel...** (notice there are several other options you can
explore).

![RStudio import menu]("fig/rstudio_import_menu.png")

Check warning on line 815 in episodes/03-basics-factors-dataframes.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[image missing alt-text]: "fig/rstudio_import_menu.png"

Next, under **File/Url:** click the <KBD>Browse</KBD> button and navigate to the **Ecoli\_metadata.xlsx** file located at `/home/dcuser/dc_sample_data/R`.
You should now see a preview of the data to be imported:

![RStudio import screen]("fig/rstudio_import_screen.png")

Check warning on line 820 in episodes/03-basics-factors-dataframes.Rmd

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[image missing alt-text]: "fig/rstudio_import_screen.png"

Notice that you have the option to change the data type of each variable by
clicking arrow (drop-down menu) next to each column title. Under **Import
Expand Down
Loading