By Niall Devitt.
Reading Time: ~5 mins.
Featured Image Source: Photo by on .
In this post:
Introduction
There is a famous, or perhaps infamous, saying in software programming that more time is spent correcting code than is spent writing new code. The same can also be said for the teaching of programming languages, where substantial time can be spent correcting basic command and syntax errors. This problem is further amplified by the move to online learning where it is not possible to call over to the student鈥檚 desk to help them sort the code, with an increased risk that they cannot follow along with the commands.
Some of the open-source features of R programming, combined with the free OneDrive storage system for students and lecturers at UL, help with reducing this risk through interactive weblinks and web pages. This blog explains some of the teaching methods and practices that have proven useful in online lab classes.
Getting prepared for the lab class
One of the first tasks involved with teaching statistics in programming languages is for students to load clean data to the console, sourced from online repositories. In advance of a lab class, the data is cleaned and saved to the lecturer鈥檚 OneDrive account. Once saved, the lecturer right clicks on the data file, and goes to the share option denoted by the cloud symbol (Image 1).
Here, the 鈥渃opy link鈥 option can be chosen to create a weblink that links up directly with the data in the OneDrive folder. In just a couple of lines of code, this link can be used to transfer the data directly to the students鈥 consoles (Image 2).
In a live lab class using Big Blue Button, these two lines of text can be added to the chat area so that students have direct access to the content. It eliminates the requirement of having to transfer csv or excel type files which need to be saved down to the main computer and called directly from this location, which can slow down the progress of the class.
Creating an interactive student experience
Once the student has the data loaded to their console, the next step is to work through code to perform statistical tests. This code can be quite complex and any error in writing out the syntax will fail to run the command. One option is to provide the student with the list of code in advance of the session, however it has been noted from experience that this removes some of the incentive of attending the class, while also being an inferior product of copying and pasting the content rather than building it from scratch.
Again, the OneDrive system can provide an efficient way of providing the code directly to the student as the lab class progresses. First, an R script document is created in RStudio and saved down to the OneDrive folder (Image 3).
Next, the link of the saved R Script document is copied using the OneDrive Share option, as explained above. This link can be used on any web browser, pasted into the address bar, to see a live version of the lecturer鈥檚 R script document on the students鈥 screens. Once the lecturer writes new code they select the save option (Image 4). The student refreshes their browser and the newly created code appears (Image 5). They can then copy this over to their console to ensure they follow the correct syntax.
Click the images below to see both a lecturer and student view of this live online lab class.
Conclusion/Summary
A lack of face-to-face engagement with students can make it more difficult to deliver module outcomes in online settings. The methods in this post create stability and consistency in the delivery of the course materials, with all students able to move along with the class. The code is left available on the live link for one week, until the next lab class, so students must engage with the content within that time. These methods are also useful in face-to-face lab classes where students can follow along with the instructor鈥檚 console in real time. In all, the experience becomes accessible to students of all abilities with greater potential for understanding the course content and passing the module outcomes.
Further Reading
Teaching Econometrics with R:
Datacamp for Classrooms:
Related LTF Resources
Office 365 Apps (including OneDrive): /ltf/supported-tools/office-365-apps