background preloader

Teaching R

Facebook Twitter

How to Teach Programming (and Other Things): The Rules. It’s impossible to put everything that matters about teaching and learning on a single page, but these ten points are always worth remembering.

How to Teach Programming (and Other Things): The Rules

Be kind: all else is details. Never teach alone. No lesson survives first contact with learners. Nobody will be more excited about the lesson than you are. Every lesson is too short from the teacher’s point of view and too long from the learner’s. How to Teach R: Common mistakes – RStudio. By Garrett Grolemund.

How to Teach R: Common mistakes – RStudio

Explicit Direct Instruction in Programming Education - Felienne. In education, there is and has always been debate about how to teach.

Explicit Direct Instruction in Programming Education - Felienne

One of these debates centers around the role of the teacher: should their role be minimal, allowing students to find and classify knowledge independently, or should the teacher be in charge of what happens in the classroom, explaining students all they need to know? These forms of teaching have many names, but the most common ones are exploratory learning and direct instruction respectively. While the debate is not settled, more and more evidence is presented by researchers that explicit direct instruction is more effective than exploratory learning in teaching language and mathematics and science.

These findings raise the question whether that might be true for programming education too. This is especially of interest since programming education is deeply rooted in the constructionist philosophy, leading many programmers to follow exploratory learning methods, often without being aware of it. Ten quick tips for teaching programming. Citation: Brown NCC, Wilson G (2018) Ten quick tips for teaching programming.

Ten quick tips for teaching programming

PLoS Comput Biol 14(4): e1006023. Editor: Francis Ouellette, Genome Quebec, CANADA Published: April 5, 2018 Copyright: © 2018 Brown, Wilson. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Funding: No funding was received for this article. Competing interests: The authors have declared that no competing interests exist. Advise for teaching an R workshop. Third Bit: 10 Simple Rules for Creating an Effective Lesson. I am putting together a short guide to creating effective lessons, and would be grateful for feedback.

Third Bit: 10 Simple Rules for Creating an Effective Lesson

If you are comfortable with LaTeX and GitHub, you can read the source at and submit issues or pull requests. If you prefer PDFs and email, you can download the current rough draft and send me comments. Use learner personas to define your audience. Encourage effective learning strategies Write summative assessments to set concrete goals. Write formative assessments for pacing, design, preparation, and reinforcement. Create Easy to Follow Technical Tutorials. File or data dependencies Sometimes you will want to make an example file available for your participant to work with.

Create Easy to Follow Technical Tutorials

Specifically in data tutorials, we often share a data file. Latest teaching topics - RStudio Community. StatsTeachR. R for Excel users. Moving over to R (or any other programming language) from Excel can feel very daunting.

R for Excel users

One of the big stumbling blocks, in my view, is having a mental understanding of how we store data in structures in R. You can view your data structures in R, but unlike Excel where it’s in front of your face, it’s not always intuitive to the user just starting out. There’s lots of great information on the hows, whys and wherefores: here’s a basic rundown of some of the common ways we structure our data in R and how that compares to what you’re already familiar with: Excel. Homogeneous in this case just means all the ‘bits’ inside these structures need to be of the same type. Where do things live in R? R for Excel Users.

One of the more difficult things about learning a new tool is the investment you make while you’re learning things you already know in your current tool.

Where do things live in R? R for Excel Users

That can feel like time wasted – it’s not, but it’s a very frustrating experience. One of the ways to speed up this part is to ‘translate’ concepts you know in your current tool into concepts for your new one. In that spirit, here’s a brief introduction to where things live in R compared to Excel. Excel is a very visual medium – you can see and manipulate your objects all the time. A Guide to R for Excel Users - R for the Rest of Us. Many of the clients I work with are coming from Excel.

A Guide to R for Excel Users - R for the Rest of Us

When I teach them R, I try to relate new information to things they are already familiar with. In that spirit, I’ve put together a short video that shows some key functions (select, mutate, filter, summarize, group_by, and arrange) from the dplyr package in R. UseR! talk on teaching R. Teach the tidyverse to beginners. A few years ago, I wrote a post Don’t teach built-in plotting to beginners (teach ggplot2).

Teach the tidyverse to beginners

I argued that ggplot2 was not an advanced approach meant for experts, but rather a suitable introduction to data visualization. Many teachers suggest I’m overestimating their students: “No, see, my students are beginners…”. If I push the point, they might insist I’m not understanding just how much of a beginner these students are, and emphasize they’re looking to keep it simple and teach the basics, and that that students can get to the advanced methods later…. My claim is that this is precisely backwards. ggplot2 is easier to teach beginners, not harder, and makes constructing plots simpler, not more complicated. I’ve continued making this argument in the years since, and I like to think our side is “winning.” When @hspter challenges me to rant about tidyverse vs base #rstats pic.twitter.com/p9uV6dLS3z— David Robinson (@drob) March 20, 2017.

Teach the Tidyverse to beginners. Don't teach students the hard way first. Imagine you were going to a party in an unfamiliar area, and asked the host for directions to their house. It takes you thirty minutes to get there, on a path that takes you on a long winding road with slow traffic. As the party ends, the host tells you “You can take the highway on your way back, it’ll take you only ten minutes. Applying the “language hacking” approach to learning (and teaching) R and Python. Just after starting at Mango I made the decision to start learning Italian. I have always been interested in learning languages and I was really keen to go back to Italy, so I thought it would be something fun to do out of work.

It turned out to have a much greater impact on my work than I expected – and not just because of project work based in Italy. In the early stages of my learning, I read “Fluent in 3 Months” by Benny Lewis. If you have never heard the name before, Benny Lewis is a polyglot (someone who speaks multiple languages) who left school unable to speak anything other than English. After six months living in Spain and failing to learn the language, he switched his approach. The “Language Hacking” Approach. Cheat sheet. RStudio Sample Exams. To help everyone who is preparing to certify as an RStudio instructor, here are examples of the kinds of questions we have been using recently. Candidates can use any reference material they want (books, online resources, old code, or YouTube videos), but may not ask another person for help, and must complete the exams in 90 minutes each.

(Most people schedule them at least a couple of weeks apart rather than back to back.) Tidyverse Exam Brendan Cullen has posted a solution guide with source available on GitHub. Basic Operations Read the file person.csv and store the result in a tibble called person.Create a tibble containing only family and personal names, in that order. Cleaning and Counting Read the file measurements.csv to create a tibble called measurements. Creating an R course on DataCamp. This post builds upon the first post about DataCamp Teach, where you saw how you can create a brand new DataCamp course from scratch. Creating a course on Datacamp is very easy, but things can go wrong if you're coding up your own course and your source files can't be understood by the DataCamp parsers.

In that case, the build messages on DataCamp Teach will tell you what's wrong so you can fix things. Let's experiment a bit and see what happens. RTutor Package. Introducing learnr. Interactive Tutorials for R. Overview The learnr package makes it easy to turn any R Markdown document into an interactive tutorial. Tutorials consist of content along with interactive components for checking and reinforcing understanding. Tutorials can include any or all of the following: Narrative, figures, illustrations, and equations.Code exercises (R code chunks that users can edit and execute directly).Quiz questions.Videos (supported services include YouTube and Vimeo).Interactive Shiny components.

Tutorials automatically preserve work done within them, so if a user works on a few exercises or questions and returns to the tutorial later they can pick up right where they left off. Examples Here are some simple examples of tutorials created with the learnr package: Hello, Tutorial! Adaptive feedback for learnr tutorials. How to deliver learnr tutorials in a package. R/exams. Automating R exercises and exams using the exams package. It's a pain to design statistics exercises each semester, and because students from previous share old exercises with the new incoming students, it's hard to design simple exercises that students haven't already seen the answers to.

On top of that, some students try to cheat during the exam by looking over the shoulder of their neighbors. Stress Testing Dynamic R/exams Exercises. Autograder: Using DataCamp's Autograder to Teach R. A "Pre-Training" R Survey. Test your tidyness - a short quiz to check your tidyverse capabilities. Components of a successful R workshop - Carson's blog on R, RStudio, plotly, shiny, data visualization, statistics, etc. Create Videos from R Markdown Documents with Ari. The real beauty of R Markdown is that it is becoming the plain text platform from which all kinds of data products can be generated: websites, blogs, books, web applications, slide presentations, and academic publications.

SimilaR: Similarity of R functions. Ghclass: Course management with ghclass. Remaster-the-tidyverse: planning repo for Tidyverse-related workshops. Flipbookr. Make R a Legitimate Part of Your Organization. By Nathan Stephens In many organizations, R enters through the back door when analysts download the free software and install it on their local workstations. How do you convince other people to use R? I just got back from the rOpenSci OzUnconf that was run in Melbourne last week. Building a R community within your office. How wide/deep should an organisation's R guidance go? Hi Ewen, Here’s my experience from the trenches. How to create an R culture. Using R packages and education to scale Data Science at Airbnb — Airbnb Engineering & Data Science.

Training an Army of Data Scientists. A Data Science Lab for R · R Views. Building R from source. Advocating for your Analytic Infrastructure. Building a team of internal R packages.