[code language=“r”] WS=c(ls()) rm(list=WS) ls() [/code]
This was the first piece of code I was confronted with in my program, which ostensibly assumes no prior programming experience. I looked around me at the artificially lit faces of my cohort, floating in the darkness like fireflies, wondering if they understood. To make the projector more visible they had turned the lights off, meaning we were plunged into a windowless dystopia in which the only light sources allowed are MacBook Pros.
I like sitting in the sunshine by the lake with a good friend. Why was I here? And what on earth does rm(list=WS) mean?
However, at the time I thought it was absolutely paramount that I quickly learnt R - I would sink if I didn’t get swimming quickly. So I learnt by reading closely through the Labs. You can see them here, at a wesbite called GitHub which is widely used by programmers: github.com/justingri…
I learnt most effectively by playing around with the code until it broke, to actively test my understanding.
Put that in the scrapbook next to the first milk tooth. It ain’t much but what is promising is that I was able to visualize a theory I learnt in an undergrad statistics class using a simulated data set: the Law of Large Numbers. This states the as the sample size gets very large, it’s average will tend towards the true average of the whole population. This is visually shown as follows: the red line shows the sample mean for increasing sample sizes - it gets closer and closer to the population mean of 25. Having been taught a load of theory at Oxford, and absolutely no way to apply it, I’m excited to fill in this gap!
You can check out the problem sets here github.com/lpwarner/… (e.g. click on ‘RPset2_2017_Handin.pdf’) to get an idea of the material I was expected to do in my first week in America with no coding experience. Yikes.