Teaching you - teaching me

Teaching you - teaching me

Teaching is rewarding, especially in coding workshops. Reflecting on experiences from Digital Scholarship Days at the University of Oslo, I learned valuable lessons from learners about Quarto slides, project management, and teaching challenges. Continuous improvement in teaching methods benefits both instructors and learners.

This post was featured on the R Weekly highlights podcast hosted by Eric Nantz and Mike Thomas.

Teaching can be extremely rewarding. I love teaching coding and programming, and helping scientists unlock a new way of working. But while most learners go into my workshops think they will be completely on the receiving end, I know that I will also learn something new from them. This, I think, is the beauty of teaching.

Digital Scholarship Days at the Universtity of Oslo

My university hosts an annual event called Digital Scholarship Days, where we showcase digital tools and methods for research. This is a volunteer effort on the instructor’s part, and organised by the University Library. It’s a great way to get to know other researchers, and to learn about new tools and methods.

It is also one of those events I make sure I have time for both for instructing, but also for attending. I always learn something new, and I get to meet new people.

This year, I instructed two workshops:

This short post is just some small notes to myself, and maybe others, about what the learners taught me about the things I was teaching them.

Quartaki (Quarto learnings)

When your slides superimpose on each other

I make a lot of slides in Quarto (and in Xaringan before that), and somehow I never managed to toggle this very very fun thing before. Once we understood why it was happening, which wasn’t my discovery, we had a good laugh about it, and the world made sense to me again.

Basically what we experiences was that this qmd text

# some header

#### I love carbs

🥶

-   souvlaki
-   makaronia tou fornio
-   pasta with halloumi

-   souvlaki
-   makaronia tou fornio
-   pasta with halloumi

produced a slide looking like this:

In the stress and responsibility of hosting a workshop, I could not get my head calm enough to see what was happening. But my learners payed more attention to what I was saying than myself, and one noted that level three headings (###) do not toggle new slides. And then I could understand.

The level 1 heading for this css, places the heading in the middle of the slide, vertically, and as such, it will superimpose on the remaining content of the slide. And there is more slide content, because the level three heading is not triggering another slide.

So, then it made perfect sense to me that I would not have experienced this myself. I’m so comfortable making slides like this, that I instinctively know that I need to add a level 2 heading or a horizontal rule to trigger a new slide. With this information clear to me, I could also explain it to the learners, and we all were happy understanding more. We added a horizontal rule and all was well.

# some header

---

#### I love carbs

🥶

-   souvlaki
-   makaronia tou fornio
-   pasta with halloumi

-   souvlaki
-   makaronia tou fornio
-   pasta with halloumi

Horizontal rule or horizontal line?

So, when you have a whole line that spans an entire page in HTML, we call that a “Horizontal Rule”, and its made by the HTML <hr> tag. Quarto rendering Markdown, obviously also supports this, but what is it called?

After giving my learner’s an exercise to add a horizontal rule to their slides, I got a question about what this was. Some finished within minutes, others’ could not locate it at all. And what determined the difference between these two groups? One group was using the “insert” button in the RStudio IDE, the other were adding through the visual editors / shortcut that I had just shown them.

Adding horizontal rule through insert Adding horizontal rule through insert

Adding horizontal line through / Adding horizontal line through /

So what’s its name? I made an issue in a Quarto repo, so I guess the developers will figure it out. And they did! My issue was closed with a fix, and according to the RStudio developers, it’s called a “horizontal line” in the IDE. Consistency is key!

Project Management

Why does IT do this to us?

This is maybe not so much my learner’s teaching me, but about IT making my teaching life harder.

So, there I am, talking about the ‘do’s and ‘don’t’s of naming files and folders.

“Don’t use spaces in your file names, because it will make your life harder”.

“Modern computers tolerate spaces, but they don’t like them.”

And there the learner’s are, on institutional computers, where IT creates folders for them that have spaces in them. Thanks, dudes. That’s not helping me.

Obviously, my first thing is I jot this down to have a stern talking to IT later (you can guess IT loves it when I do that :P). I don’t know why they do this, it’s not the first time, and likely not the last either. I try not to be a jerk about this, but this seriously makes me miffed. I’m trying to teach people good IT practices, and it would help me a great deal to have IT in my corner on this one.

Now, our IT has some awesome people and they do do some great stuff for us. I just think they forget that among the University as a whole, there are a lot of us using complex tools and programming to solve our scientific questions. Its a balance between making a system that works for us and the people who just need to write a paper in Word.

Anyway, e-mail to IT sent. Let’s see what they say.

Coincidentally, Heidi Seibold wrote something about this on mastodon just a couple of days after this, which was lovely and validating to me.

How many versions of R?

Anyone working on an institutional computer with networked drives, or shared spaces, likely also know that they will mess around with some of your R settings. Some for good, some for good reasons but maybe not great for your work.

One of those things is setting up so-called site files for Rprofile and Renviron. These make sense they do something with, good specified site files lift a heavy burden off users when circumstances call for them.

Problems usually arise because IT don’t themselves use R, so they have limited knowledge and experience about how people work in R and what are good things to do. So what I discovered in the workshop, was that on one of our shared project spaces, we had 5(!) R library paths at various levels. Maybe necessary, but likely not. One of the paths was there, but completely empty, and therefore unnecessary.

And then, I discover the most fun part. Exploring the R libraries and packages installed, I discovered that the packages I had access to in these various site folders, had been compiled across 11(!) different R versions!

I mean, sure, they’re all same major version (R forces clean library at major releases), and its totally possible to have it like this. But it is also a bit of a mess, and I’m not sure how it happened.

Another e-mail off it goes!

Conclusion

So, teaching is awesome, and they are not the only ones learning! That being said, it is also exhausting and I’m glad I don’t do it all the time. My voice is hoarse and energy levels are low, but I’m happy I did it. The learners were so nice, and I think we all had a lovely time together.

  • Sep 26, 2023

    Posit::conf 2023

    Attending Posit::conf (formerly RStudio::conf) in Chicago was an exhilarating experience filled with learning, speaking engagements, insightful workshops, and connecting with the R and Data Science communities. Highlights included workshops on R fundamentals and package development, exciting updates on Quarto, and invaluable networking opportunities.

  • Dec 01, 2022

    Advent of R Functions

    Explore 15 essential pieces of R code to streamline your data analysis and visualization workflow. From creating directories and handling files to customizing ggplot and working with logit scales, these snippets can help you enhance your programming efficiency and maintain cleaner scripts.

    Read
    advent-calendar
    r
    r-functions-2022
  • Nov 07, 2022

    Let’s Get Apply’ing

    Learn to replace loops with vectorized apply functions in R for efficient data manipulation. This guide covers converting loops to functions using sapply and mapply, enhancing your programming skills by making code more readable and less error-prone.

    Read
    r
    apply
  • Mar 14, 2021

    New {ggseg} with Geom!

    We released a new version of the ggseg R-package for visualizing brain atlases. It features a geom_brain function and position_brain for flexible brain slice positioning in ggplot2. This update enhances atlas plotting, offering more customization and improved visuals.

    Read
    r
    neuroimaging
    ggseg
  • Dec 31, 2020

    New Year’s Wishes

    Here’s a ggplot2 holiday card wishing you a better 2021! Explore how to create a festive holiday plot in R with ggplot2. Understanding the preparation of data for plotting, using geom_circle, adding blur effects, and customizing text. This exercise enhances your skills in working with ggplot2 and thinking critically about data structures and visual outputs.

    Read
    r
    plots