drhur: Learn R with Dr. Hu Easily and Happily

knitr::opts_chunk$set(
  message = FALSE,
  warning = FALSE
)

library(kableExtra)

Overview

Learning a programming language such as R is tough. drhur is a pedagogical software make the R learners' life a little bit easier and more happily. The package includes (and is going to include more) tutorials of basic and advanced data science skills with R, such as data cleaning, analyzing, and visualization. The goal of the package is to provide an interactive platform for learners to enter the R world easily and efficiently.

The package is built upon the learnr function which will open a shiny app for learners to interact with the instructions and tasks. The best way to learn these skills together with the "Learning R with Dr. Hu" online/offline workshops. One can get more information about the workshops through my website or contact me directly.

Usage

One can easily load the package and call the tutorials through the function drhur(). For instance, one can initiate the visualization tutorial with the following commands:

if (!require(drhur)) install.packages("drhur")
library(drhur)

drhur("visualization")

The current available tutorials include´╝Ü

txt <- data.frame(
  Function = 
    c('<a href="#playing">playing</a>',
      '<a href="#munging">munging</a>',
      '<a href="#analyzing">analyzing</a>',
      '<a href="#visualizing">visualizing</a>&nbsp;&nbsp;'),
  Description = 
    c('**Playing around with R:** Intro to basic data structure in R; inputting, outputting, and creating data.',
      paste('**Data munging: ** Generalizing (such as sorting and summarizing) and extracting (selecting or adjusting certain columns or rows) data frames.'),
      paste('**Data analyzing:** Analyze data with descriptive and multivariate tools and diagnoses.'),
      paste("**Data presenting:** Present descriptive and analytic results with 'ggplot2'")),
  Usage = 
    c("`drhur('playing')`",
      paste("`drhur('munging')`"),
      paste("`drhur('analyzing')`"),
      paste("`drhur('visualizing')`"))
  )

kable(txt, format = "html", escape = FALSE, align = c('l', 'l')) %>%
  kable_styling(full_width = FALSE, position = "left") %>%
  column_spec(1, bold = TRUE, monospace = TRUE, border_right = TRUE) %>%
  column_spec(2, width = "28em") %>%
  column_spec(3, width = "28em")

Conclusion

drhur aims to help R learners to get in touch with the most common applied skills of the programming language. We encourage users to consult the help files for more details.

The development of the package is ongoing. Please contact us with any questions, bug reports, and comments. Free to open an issue on GitHub if you have any question or a feature request.

Affiliation

Yue Hu

Department of Political Science,

Tsinghua Univeristy

Email: yuehu@tsinghua.edu.cn

Website: https://sammo3182.github.io



Yuefei Sun

Department of Political Science,

Tsinghua University

Email: sunyf20@mails.tsinghua.edu.cn



Try the drhur package in your browser

Any scripts or data that you put into this service are public.

drhur documentation built on Nov. 1, 2020, 5:17 p.m.