Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bolin-Wu/workshopr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction to R workshop

Welcome to the Github repo for the R workshop in KI. This repo contains all necessary material and information for the course.

R package

The course has its own R package, workshop, which aims to make example data and script easily accessible. To install the package, run the following code in R Studio. For more details, please check the 'rpackage' folder.

  1. install.packages("remotes")
  2. remotes::install_github("Bolin-Wu/workshopr", subdir = "rpackage", force = TRUE)

Workshop 2022

This workshop focuses on the beginner level.

Workshop 2023

  • Register link is here.
  • The flyer is here

This workshop is an extension of workshop in 2022, which focuses on the intermediate level. The topic consists of

  • Loop function
  • Tidyverse toolkits
  • R markdown

Loop

Ashley Tate leads this session.

Example code

  • View online here
  • Get script directly in R workshopr::get_code_2023(session = "loop")

Tidyverse

Bolin Wu introduces useful data manipulation functions in daily work tasks:

  • %>% syntax
  • join data frames (join function)
  • transform data shape (pivot_longer)
  • filter variables based on name pattern (select)
  • extract the label from DTA and SPSS in R (filter)
  • check missing values (summarise & across)
  • mutate data based on column types (mutate & across)
  • bin variables by percentiles (case_when)
  • assign function

Slide

  • Downloadable PDF here
  • View online html slide here

Example code

  • View online here
  • Get script directly in R workshopr::get_code_2023(session = "tidyverse").

R markdown

Bolin Wu explains the basic uses of R markdown and its integration into daily work:

  • markdown
  • yaml heading
  • code chunk options
  • live code demo

The slide is here.

To retrieve R markdown templates in R, one can run the following commands in RStudio:

workshopr::get_rmd_2023(name = "pdf_example",output_file = "pdf")
workshopr::get_rmd_2023(name = "word_example",output_file = "word")
workshopr::get_rmd_2023(name = "html_example",output_file = "html")

Get the final exercise here

Other resources

About

R workshop teaching materials @ Aging Research Center, KI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published