Crowd-sourced repository of reprex 'solutions' to reverse-engineer?

Hi, I've been thinking about this for a while, but was nudged into posting by @MonkmanMH's recent post about mulitple-choice questions: In many ways, trying to answer questions that folks post on the RStudio Community site is a powerful way to aid long-lasting learning and understanding.

One way I've tried to mimic this in my classes is to present students with a codeless solution, like just the plots from the ''Basic plot types' section of 'ggplot2: Elegant Graphics for Data Analysis':

library(tidyverse)
df <- data.frame(
  x = c(3, 1, 5), 
  y = c(2, 4, 6), 
  label = c("a","b","c")
)
p <- ggplot(df, aes(x, y, label = label)) + 
  labs(x = NULL, y = NULL) + # Hide axis label
  theme(plot.title = element_text(size = 12)) # Shrink plot title
# p + geom_point() + ggtitle("point")
# p + geom_text() + ggtitle("text")
# p + geom_bar(stat = "identity") + ggtitle("bar")
# p + geom_tile() + ggtitle("raster")
# p + geom_line() + ggtitle("line")
# p + geom_area() + ggtitle("area")
p + geom_path() + ggtitle("path")

# p + geom_polygon() + ggtitle("polygon")

Created on 2020-03-20 by the reprex package (v0.3.0)
and have them try to recreate all the plots and the single table used to generate them all.

Similarly, I might present students with before-and-after images of table manipulation and ask them to produce the 'after' table from the 'before' table, which is a qualitatively different experience from asking them, say, how they would make new table about books by extracting all the rows where the author's first name is 'Hadley'.

Since these kinds of exercises take time to put together, it occurred to me that building a repository (maybe literally in the git sense) of crowd-sourced reprexes for students to reverse-engineer would be incredibly useful. What do other folks think?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.