Skip to content

mahendra-mariadassou/tidytraining

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

migale tidyverse training

The goal of this package is to provide interactive tutorials for the tidyverse training module. The tutorial are shamelessly taken from rstudio-education for the basics of R and the tidyverse. Tutorials are packaged so you can install them on you computer and do the exercices without access to an internet connection.

Installation

Installing R and other dependencies

You only need to perform each of the following steps once:

  • installing R
  • installing Rstudio
  • installing R packages remotes and learnr

However each of them may take some time.

Installing R

Go to the CRAN webpage, select your OS and follow the instructions.

  • On Windows, you should just download and execute an .exe file.
  • On MacOS, you should just download and execute a .pkg file.
  • On Linux, you can get install R from the command line using something like
## If you're on Ubuntu
sudo apt-get install r-base

Installing RStudio Desktop

Go to the download page. Select, download and install the file corresponding to your OS.

Installing R packages

Launch Rstudio (by clicking on the corresponding icon) and execute the following commands in the console

install.packages("remotes") 
install.packages("learnr") 

On Windows: you may need Rtools and git

  • Rtools: visit the dedicated page, download the suggested exe and install it on your computer
  • git: visit the dedicated page, download the suggested exe and install it on your computer

On MacOS: you may need XCode

  • XCode: visit the dedicated page, download the Mandatory tools and install them on your computer

Installing the tutorials

You need to install the tutorials every time there is an update (hopefully not too often)

Installing the tutorials for the first time

You can install the tutorials from GitHub by launching Rstudio and typing the following command in the console:

remotes::install_github("mahendra-mariadassou/tidytraining")

Updating the tutorials

Whenever we fix a bug / typo or add new content, you need to update the tutorials on your computer. To do so, start a fresh Rstudio session and type the following command in the console:

remotes::install_github("mahendra-mariadassou/tidytraining")

Starting a tutorial

This package is intended for use with learnr:

library(learnr)

You should only launch one tutorial at the time. Before launching a new tutorial, restart R.

Basics of programmings

## Launch only one tutorial at the time!!
learnr::run_tutorial("01_programming_basics", package = "tidytraining")
learnr::run_tutorial("02_visualisation_basics", package = "tidytraining")

Data manipulation

learnr::run_tutorial("03.1_tibbles", package = "tidytraining")
learnr::run_tutorial("03.2_isolating_data", package = "tidytraining")
learnr::run_tutorial("03.3_summaries", package = "tidytraining")

Tidy data

learnr::run_tutorial("04.1_reshape_data", package = "tidytraining")
learnr::run_tutorial("04.2_separate_columns", package = "tidytraining")
learnr::run_tutorial("04.3_join_datasets", package = "tidytraining")

Troubleshooting

If you have an error when launching a vignette (it may happen on Windows with R 4.0.0), try this syntax (illustrated on the first vignette):

rmarkdown::run(file = NULL, 
               dir = learnr:::get_tutorial_path("01_programming_basics",  
                                                package = "tidytraining"), 
               shiny_args = list(launch.browser = 1))

About

Interactive tutorials for the tidyverse training module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages