I am currently writing a course for our on-line Master of Applied Business Analytics. The students do a foundation course in basic stats and computing first, but it is very basic and they do not have a background in coding. The course involves lots of R-studio.
I was initially quite worried about how to get them up to speed in base-R. It takes ages to get proficient in any language. So my approach is to provide them with annotated code. This is not enough though. So I will prominently recommend that for any script.r files that they do not understand they should give the following prompt to any AI:
“Explain this R code to a beginner. Describe the goal of the analysis, what each main section does, and clarify the meaning of any non‑obvious R syntax. Focus on interpretation rather than programming details.”
I will also suggest that when any of their code does not run, just drop it into AI (listing the error message or errant behaviour) and ask why.
To me, this is a perfect use of using AI – to learn!