To access the data, you need to be logged in to Moodle. When accessing the CSV file using read.csv(URL)
, even if you're logged onto your browser, R fetches the data from the URL directly itself, so you need to provide your log in details to R's request to access the URL.
This would be more complicated for a student than just learning how to download the file, save it to a working directory, and read it into R from there.
Therefore, using read.csv(URL)
will make it (much!) more complicated.