R in Eighty Days

How much R can I learn from scratch in eleven-and-a-half weeks?

Day 2: Friday 16th August 2019

Full disclosure: I am not technically an R virgin. I did once attempt an R tutorial on DataCamp about 15 months ago. I'd been feeling guilty after a collaboration with John MacKintosh that we'd showcased at the Scottish AphA conference in Perth (using R to show data on patient flow), and it had been basically John doing all the work and me just coming up with one or two random visualization ideas, and John's work had enthused me about R's possibilities and potential, but my initial attempt at learning it fizzled out pretty quickly, I couldn't really see the point of it. So it got left, and R has remained this cavernous dark hole ever since.

R is still a foreign country.

But that is all going to change now!

So, what did I do today?

I bought a book. R in a Nutshell by Joseph Adler. It cost me £26 on Amazon. (Strictly speaking, I bought the book yesterday; but it arrived today.)

I downloaded R. I followed the book's instructions on page 4 and I went to the https://www.r-project.org/ website and I downloaded R for Microsoft Windows from a mirror site at Imperial College London. I now have two desktop icons on my desktop. Ri386 3.6.1 is what one of them says; Rx64 3.6.1 is the other one. Already I seem to have entered a temple where a certain level of fluency in technological terminology is assumed!

I clicked on the Rx64 3.6.1 icon and then messed about in what I hope I am right in thinking is 'the console' (have I got my first bit of jargon correct..?). I quite liked the chevron prompt and the red cursor blinking at me all expectant, waiting for my first command! The first thing I did was a sum you see halfway down page 12 of the book. 17 + 3. So we'll say that's my starting-point. 17 + 3. Arguably it's useful. I mean: it's a million miles away from where I'm trying to get to by Saturday 2nd November, but it's useful nonetheless.

I read a bit of Chapter 3, too, but I was tired. It talked a lot about vectors. I found that confusing, it sounded a bit too maths-y. I didn't immediately see what the point of that was. Who needs vectors? (I realise there's a risk that sentences like "Who needs vectors?" are going to sound hugely ridiculous in the days and weeks ahead, but—frankly—who cares, this is supposed to be an authentic, unfiltered account of my learning journey and that is what I actually felt about vectors so I'm leaving that sentence in.) Also, this idea of multiplying the first number in one vector by the first number in another vector, the second one by the second one, and so on. I mean: why?

Anyway, I also learnt—I think—that when you type something into R in the console, it's called an 'expression', and you just have to hit return to get R to execute the expression (I somehow doubt that 'execute' is the right word to use but I'll let that go for now!)

Previous Day ... Next Day