setwd("/PathToMyDownload/RU_Course_template/r_course")
# e.g. setwd("~/Downloads/Intro_To_R_1Day/r_course")My Course Template, Session 1
Bioinformatics Resource Center - Rockefeller University
???My Course name (session1)???
Overview
??We often put an overview slide that links to the various parts of the course content to make it easy to navigate i.e. this one for intro to r??
Set Up
Materials
??We try to denote each major section of content with these title slides (see above for set up). A level-1 heading (#) becomes an inverse section-divider slide; a level-2 heading (##) is a normal slide. The hierarchy also drives the single-page version.??
?? Materials just gives the links to download the package. Just ensure links are up to date??
All prerequisites, links to material and slides for this course can be found on github.
Or can be downloaded as a zip archive from here.
Course materials
?? this slide just shows where thye can get the course content from the download. You do not need to populate these directories. It will be made during compilation??
Once the zip file in unarchived. All presentations as HTML slides and pages, their R code and HTML practical sheets will be available in the directories underneath.
- r_course/presentations/slides/ Presentations as an HTML slide show.
- r_course/presentations/singlepage/ Presentations as an HTML single page.
- r_course/presentations/r_code/ R code in presentations.
- r_course/exercises/ Practicals as HTML pages.
- r_course/answers/ Practicals with answers as HTML pages and R code solutions.
Set the Working directory
Before running any of the code in the practicals or slides we need to set the working directory to the folder we unarchived.
You may navigate to the unarchived RU_Course_help folder in the Rstudio menu.
Session -> Set Working Directory -> Choose Directory
or in the console.
Another section header
Slide Structure
We use a double hash/pound (##) for slides, and a single # for inverse section-divider slides. Keeping this hierarchy is important: it structures both the slides and the single-page version.
To split content across several slides under the same title, put one ## heading and use a horizontal rule --- for each continuation slide (do not repeat the heading). On the slides you get multiple slides; on the single page the heading appears once.
Left/Right alignment
To show things side by side on a slide use a columns container. On the single page the columns simply stack one after the other:
This will be on left of slide
This will be on right
Data from external sources
everything in the qmd is relative to the inst/extdata directory so you have some data to load in, just put it in the data directory, read it in along the path. The structure is maintained for those attending the course and download the package using the instructions. The same rules are followed for imgs and scripts that you may call.
Table <- read.table("data/readThisTable.csv",sep=",",header=T)Big Processes
If what you want to do is super intense computationally you can use the eval=F arguments to prevent it being done during compilation.
#Intense computation
myresult<-10^6 +1You can then just load in the result of the computation, and keep using the result after that. If you do want them to evaluate the intense computation, then you can hide this intermediate file that you are loading in with echo=F.
Links
Links to external sources and other material can be included:
The links are also checked to ensure that they work by the link-check action. When you check the GitHub actions if there is a green check, it means that all the links are still valid.
Section A
When explaining the same topic over multiple slides you can use the same header. This is often useful if you have a large code chunk coupled with a large figure. You can set eval=F, repeat the same code then set eval to TRUE and echo to FALSE
boxplot(Table[,2:7])Section A
While looking at this in the single page form this should also collapse redundant titles
Section A
While looking at this in the single page form this should also collapse redundant titles. This allows you to repeat it in slides, but have just one title for single page.
Exercises
The following few slides show you how to structure exercise slides.
We often have several exercise slides per session. So you can just copy and paste and change the directory to the appropriate name. All 3 file types are made from you single exercise qmd.
Time for an exercise!
??? exercise description here?? here
Answers to exercise
Answers can be found here
Exercise again
So we can have some more sections here describing some new important topic
Then more exercises
Time for an exercise!
??? exercise description here?? here
Answers to exercise
Answers can be found here