Archives

Ep5] Cleaning Data, loops and Vectorisation

2] Cleaning Data: To remove a column ‘col’ in a dataframe ‘data’ using null, the command is:

data$col <- NULL

How to apply hash strings (a series of unreadable text) to replace important data e.g. full names. https://cran.r-project.org/web/packages/openssl/vignettes/crypto_hashing.html

3] For Loops:

The code I discussed

For (i in 1:10){

commands to be written here in a series of lines

}

4] Vectorisation: The explanation of apply (and related commands like ‘lapply’) I used is here https://www.guru99.com/r-apply-sapply-tapply.html

Ep4] New Moodle project, Acquiring data

This week I discuss a new Moodle project and how I’ve been using R to process and visualise students use of educational materials.

Part 1] A New Problem

What is Moodle? Note that my University doesn’t use the latest version of Moodle.

Part 2] Acquiring data

How to download logs from Moodle

Part 3] General Points about R from the project

See ‘Scripts’ in this chapter

Part 4] Plot_ly

Examples of using Plotly with r, this free online text book teaches more about how to use Plotly

Ep3] Data Frames, If & Scripts

Shownotes R from Scratch Ep3

1] Packages HowTo install into RStudio 

2] Dataframes Introduction to dataframes

3] Scripts in R Introduction to scripts in RStudio

4] If statements in R Introduction to If statements in R

5] Cleaning data in R Introduction to cleaning data in R

7] Shiny