R in Eighty Days

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

Day 9: Friday 23rd August 2019

I'm writing as I go through the textbook, it's a bit like taking notes in a lecture. But slower. I'm on page 22 of R in a Nutshell, I've just finished a section on Functions (the examples it gave were not ones I can see myself using—exp and cos, for example—though I can see that log might occasionally be useful).

Anyway, now I'm onto the Variables section and this bit here looks as if it might be important, it's where you assign a value to a variable so that you can refer to it subsequently by the name you've just assigned to it. Like the shorthand aliases we use in SQL, possibly..? And the operand to use here is <- which it turns out is pronounced 'gets', so if you type, for example:

x <- 1

...you pronounce it as 'x gets 1' and you have basically created a pseudonym for 1, and the pseudonym is 'x'.

OK, here's the next thing, and it's a bit confusing. The author says I don't actually have to bother with the whole <- thing; instead I can just use = instead. But then there's this crazy caveat that if you really want to say =, you have to use ==. Double equals. Blimey!

Anyway, moving on, and now we're onto a bit called Introduction to Data Structures, and it's telling me that there aren't just vectors in R; there are also things called arrays and matrices.

And now it's lists, and this book is moving too fast for me, but then I see this sentence which I can't help but think is important but it's simultaneously doing my head in: "A data frame is a list that contains multiple named vectors that are the same length." And I'm sort of thinking, "Hey, that sounds like the definition of a data table!", so thank goodness for the next sentence because it pretty much confirms what I think I was thinking: "A data frame is a lot like a spreadsheet or a database table." Which must mean that I'm sort of beginning to 'get' it! But I maybe want to re-visit this stuff later when I'm a bit less tired.

I'm going to try another couple of paragraphs before I call it a day. Trouble is, the next bit is about Objects and classes, and I'm lost again. And it gets worse because after that is a description of what a 'model' is, and it's all got a bit over-complicated and that just annoys me.

I'm done. It's 17:11 on a Friday afternoon. It's been a long day. I'm going home.

Previous Day ... Next Day