Skip to content
An R package associated with the Data Science in Education Using R book
R
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github use tidy issue page Jan 17, 2020
R export data cols Jan 18, 2020
data-raw/wt01_online-science-motivation fix typo Jan 18, 2020
data
docs
man
pkgdown/favicon
.Rbuildignore
.gitignore Update .gitignore Jan 5, 2020
.travis.yml
DESCRIPTION run use ccby 4.0 license again (not sure why it didn't run right the … Jan 17, 2020
LICENSE.md add CCBY 4.0 license Dec 24, 2019
NAMESPACE export data cols Jan 18, 2020
README.Rmd
README.md
_pkgdown.yml
appveyor.yml
dataedu.Rproj

README.md

dataedu

Travis build status AppVeyor build status

The goal of dataedu is to provide readers of Data Science in Education Using R with a package with useful functions, data, and references from the book.

Installation

1. Install {devtools}

First, let’s install devtools, an R package with many handy R tools. In your R console, type in:

install.packages("devtools")

If you already have {devtools} installed, you can move on to the next step.

If you are not sure whether you have it installed, you can run this function, which will install {devtools} if you do not already have it.

if (!require(devtools)) {
  install.packages("devtools")
  library(devtools)
}

2. Install {dataedu}

You can install the development version of {dataedu} by running this in your R Studio console:

devtools::install_github("data-edu/dataedu")

3. Call the package

Before you can use the package, make sure to call it using library():

library(dataedu)

Package Contents

We created this package to provide our readers an opportunity to jump into R however they see fit.

  1. Mass installation of all the packages used in the book
  2. Reproducible code for the walkthroughs
  3. Access to the data used in each of the walkthroughs
  4. The dataedu theme and color palette for reuse

Mass Installation of Packages

We strived to use packages that we use in our daily work when creating the walkthroughs in the book. Because we covered a variety of subjects, that means we used a lot of packages! As described in the Foundational Skills chapter, you can install the packages individually as they suit your needs.

However, if you want to quickly get started and download all the packages at once, please use mass_install(). This function uses the very handy p_install() from the pacman package, which facilitates the installation and loading of packages.

dataedu::mass_install()

To see the packages used in the book, run:

dataedu::all_packages
#>  [1] "apaTables"   "caret"       "dummies"     "ggraph"      "here"       
#>  [6] "janitor"     "lme4"        "lubridate"   "performance" "readxl"     
#> [11] "rtweet"      "randomNames" "sjPlot"      "tidygraph"   "tidylog"    
#> [16] "tidyverse"   "tidytext"

A special note on {tabulizer}: One of the walkthroughs uses tabulizer, created by ROpenSci to read PDFs. {tabulizer} requires the installation of RJava, which can be a tricky process on Mac computers. {tabulizer} is not included in mass_install() and we recommend reading through the notes on its Github repo if installing.

Reproducible Code for Walkthroughs

Coming soon!

Accessing the Walkthrough Data

You can call the dataset as mentioned in the walkthrough.

dataedu::course_data

Using the {dataedu} Theme and Palette

As in following, simply add the theme and palette to ggplot2-based plots:

library(ggplot2)
library(dataedu)

ggplot(midwest, aes(x = area, y = popdensity, color = state)) +
  geom_point() +
  theme_dataedu() +
  scale_color_dataedu()
#> Importing fonts may take a few minutes, depending on the number of fonts and the speed of the system.
#> Continue? [y/n]

Contact

You can’t perform that action at this time.