3 - What's a pirate's favorite language?

The deep end

This is what it looks like:

[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?


Well, there's no motivator like necessity. Or so I thought. In hindsight, I probably won't be using R much in my course, Python being favoured in both my programming sequence and computational social science sequence.

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.

First Graph

As someone who thinks that they may want to explore data visualization, it was pretty exciting to produce my first graph. Here it is: graph

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.

Deep end revisited

I look forward to coming back to that code at some point and seeing if I can decipher it!
Written on
Sub-Topics | Search | Subscribe

© 2023 L Warner
To email me humans:
take this site’s domain name
and replace the a. with @
A Moderner Website
in an IndieWebRing 🕸💍