Helping an English Student with R

·

I got an interesting message from my daughter recently. She’s doing graduate studies in Belgium at KU Leuven. Her field is literature and linguistics, and as part of that, she has to analyze various writings. While visiting with her last month, she mentioned that her professor was using R (R Language) and giving them scripts to run to look at language usage.

The other day she texted that her R script wasn’t running and could she get some help. She was a little intimidated to ask the professor why the script didn’t run on her laptop, when she saw it running in class on the professor’s machine. I had some time, so we started a screen-sharing session on WhatsApp, which is amazing. Side note, I can’t believe I can talk with my daughter and watch her work on her computer in real time, with a few clicks of a button.

In any case, she told me she was getting a file size error. She couldn’t load a 32MB file because the RStudio limit was 5MB. That seemed a little funny to me, as I’ve had some large files loaded into RStudio. My suspicion was that this error was masking another problem, but I watched my daughter work to see.

What she had done:

  1. download a zip file
  2. extract this to a new folder in Documents
  3. open the R script in RStudio
  4. drag the text file for analysis into RStudio

That seemed strange. In looking at her script, I realized there was likely a pathing issue. We ran a getwd() and then a setwd() to experiment. We got a different error, which looked to me like a collation/formatting issue. We added a fileEncoding parameter to read.delim() and the script started working. She was amazed and pleased.

Explaining the technical aspects of this to an English(ish) student, and helping her to lightly understand what to do was interesting. She made notes in a file on using setwd(), changing backslashes from Explorer to forward slashes, and how to add the parameter to the various read commands. Ultimately, she was back to being productive, without learning much about R or technology, but having a path forward of things to try when something broke, with notes saved in a document.

It reminded me of myself when I’m trying to fix something on the ranch I’ve never done before. I have to quickly learn what’s wrong, how to troubleshoot the extent of the issue, and decide how to move forward. Those troubleshooting skills are invaluable, and that’s likely the biggest thing my daughter learned. That’s what I think is a struggle for many people, in all fields, but certainly in technology.

The next time you get a chance to help someone troubleshoot, work with them, explain your process, and help them improve for the future.

Steve Jones

Listen to the podcast at Libsyn, Spotify, or iTunes.

Note, podcasts are only available for a limited time online.

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.