How do you annotate student's R-studio notebooks?



I use R-studio server in my intro statistics classes. For assignments, students are instructed to create an html notebook in a specific location (or to edit an already created one). I then grade their work directly in the specified locations in their home directories. I am trying to figure out a good way to add teacher comments and annotations, including code corrections, to their notebooks, in such a way that my comments are clearly distinguishable from their contents. Is anybody doing something similar? Do you have a good way to do this?

Thank you for any suggestions!


How about something like Github/Gitlab/etc? They allow comments on source code and you can even do it PR-style where they contribute a PR to the notebook and you can comment on it directly. Not sure if that's the easiest route for what you are doing, but it does mirror how "real" software development is done, so might be an advantage as a learning exercise.


This is the approach I've taken in my courses, which use GitHub Classroom to set up group and individual projects on GitHub. Note that GitHub's code review mechanisms are really best suited for PRs, which make them difficult to apply in this context. Also, because HTML does not display on GitHub, we have students use the github_document output format instead.

Most feedback comes using the "issues" mechanism, which allows things like deep-linking into the code, and can encourage dialogue with students. We don't do any auto-grading, and this doesn't integrate easily into a grading platform for tallying scores.