diff --git a/episodes/00-before-we-start.Rmd b/episodes/00-before-we-start.Rmd index 6b58120e..25e4bd9e 100644 --- a/episodes/00-before-we-start.Rmd +++ b/episodes/00-before-we-start.Rmd @@ -234,7 +234,7 @@ The Default Layout is: enters into the computer's working memory. The History tab displays all commands that have been executed in the console. -- **Navigation Pane** +- **Files, Plots, Packages, and Help pane** This pane has multiple functions: - **Files:** Navigate to files saved on your computer and in your working directory @@ -402,10 +402,9 @@ bioinformatics). ### **Installing packages using the Packages tab** -Installing CRAN packages can be done from the Packages tab in the Navigation -Pane. Click `Install` and type in the name of the package you're looking for. +Installing CRAN packages can be done from the Packages tab in the Files, Plots, Packages, and Help pane. Click `Install` and type in the name of the package you're looking for. -```{r install-packages, echo=FALSE, fig.cap="Click on the Packages tab in the Navigation Pane to download packages from CRAN.", fig.alt="install packages pane showing an entry for installing the 'tidyverse' package"} +```{r install-packages, echo=FALSE, fig.cap="Click on the Packages tab in the Files, Plots, Packages, and Help pane to download packages from CRAN.", fig.alt="install packages pane showing an entry for installing the 'tidyverse' package"} knitr::include_graphics("fig/R_00_Rstudio_03.png") ``` diff --git a/episodes/01-intro-to-r.Rmd b/episodes/01-intro-to-r.Rmd index 5f335737..31865b1e 100644 --- a/episodes/01-intro-to-r.Rmd +++ b/episodes/01-intro-to-r.Rmd @@ -308,7 +308,7 @@ square root of the number provided in the function call. Therefore you can run `sum(sqrt(9), 4)` to take the sum of the square root of 9 and add it to 4. Typing a question mark before a function will pull the help page up in the -Navigation Pane in the lower right. Type `?sum` to view the help page for the +Files, Plots, Packages, and Help pane in the lower right. Type `?sum` to view the help page for the `sum` function. You can also call `help(sum)`. This will provide the description of the function, how it is to be used, and the arguments. diff --git a/episodes/02-starting-with-data.Rmd b/episodes/02-starting-with-data.Rmd index 65e653b7..48fc0d50 100644 --- a/episodes/02-starting-with-data.Rmd +++ b/episodes/02-starting-with-data.Rmd @@ -52,35 +52,6 @@ to this episode and follow the instructions on creating an R project folder. Once you have created the project, open the project in RStudio. -## Getting data into R - -We will be using a demo dataset from the University of Houston--Clear Lake -Integrated Library System in 2018. It contains a relatively random sample of books -from the catalog. - -In order to use your data in R, you must import it and turn it into an R *object*. There are many ways to get data into R. - -- **Manually**: You can manually create it using the `data.frame()` function in Base R, or the `tibble()` function in the tidyverse. - -- **Import it from a file** Below is a very incomplete list - - Text: TXT (`readLines()` function) - - Tabular data: CSV, TSV (`read.table()` function or `readr` package) - - Excel: XLSX (`xlsx` package) - - Google sheets: (`googlesheets` package) - - Statistics program: SPSS, SAS (`haven` package) - - Databases: MySQL (`RMySQL` package) - -- **Gather it from the web**: You can connect to webpages, servers, or APIs - directly from within R, or you can create a data scraped from HTML webpages - using the `rvest` package. For example - - the Twitter API with - [`twitteR`](https://sites.google.com/site/miningtwitter/questions/talking-about/wordclouds/wordcloud1) - - Crossref data with - [`rcrossref`](https://cran.r-project.org/web/packages/rcrossref/rcrossref.pdf) - - World Bank's World Development Indicators with - [`WDI`](https://cran.r-project.org/web/packages/WDI/WDI.pdf). - - ### Set up your working directory The working directory is an important concept to understand. It is the place @@ -159,6 +130,9 @@ read.csv("./data") to represent that sub-directory. :::::::::::::::::::::::::::::::::::::::::::::::::: +## Getting data into R + + ## Downloading the data Once you have set your working directory, we will create our folder diff --git a/episodes/04-data-viz-ggplot.Rmd b/episodes/04-data-viz-ggplot.Rmd index bba26100..f63f87d4 100644 --- a/episodes/04-data-viz-ggplot.Rmd +++ b/episodes/04-data-viz-ggplot.Rmd @@ -119,8 +119,8 @@ People are sometimes confused between `ggplot2` and `ggplot`. The former refers When you run the `ggplot()` function, it plots directly to the Plots tab in the -Navigation Pane (lower right). Alternatively, you can assign a plot to an R -object, then call `print()`to view the plot in the Navigation Pane. +Files, Plots, Packages, and Help pane (lower right). Alternatively, you can assign a plot to an R +object, then call `print()`to view the plot in the Files, Plots, Packages, and Help pane. ## Creating your first plot