I spent around half hour yesterday getting an insight into how
(e:Paul) thinks about the basics of programming. It was most enlightening. I wish I had been in one of
(e:Paul)'s programming classes (insert dodgy stalker grin here) and had a chance to learn all of it in a more structured format. I wondered how I might have turned out, if years before I had actually chosen to go to the engineering school I was selected for, instead of tramping down the completely diametric path I chose.
Who knows.
I believe it's not too late though. So I am going to learn, regardless of how long it takes to get to minimum proficiency.
Some basics that I sponged up
A variable: something that varies. It can be many types.
- Float (yeah, not the cruise one but just as fun: a number).
- Integer, a natural number (and organic to boot).
- String, a word which may or may not mean just that.
- Boolean, true or false and nothing else in between.
- Arrays, a collection of random stuff. (Also called lists in the R world).
- Objects: this has a sort of equivalent in R. When I define a logistic regression model in R, I am trying to describe how an outcome variable (say, any cancer yes/no) is related to many other variables (say, family history, alcohol consumption, body mass index etc.) Since it's a logistic regression, it has some properties or assumptions. The method of combination of my other variables is linear (there are no second or higher order terms in the equation). There are many options that you can put into this "model". How would the model accept other variables? How many variables can it accept before it becomes illogical or the power to say anything conclusively runs out? etc. Once this object or model is defined, you can change some variable in it, and see how the model changes - for example is a non-alcoholic as likely to respond as well to cancer chemotherapy as an alcoholic? If I run this model in R, I will get several properties of this model - that define how this model is behaving. So the model along with its defined and computed properties is a sort of "object": an artificial emulation of a slice of reality (or fantasy).
Indexing: helps in selecting and choosing particular variables that you have defined above Though we didn't talk about it yesterday, indexing in one key weapon in R that gets you out of many scrapes. In its most simple form, it is array[x], or data.frame[x], or list[x] where x is some number. x can be defined and derived in a million different ways. A tip of the hat to Tim Toady!
Aha, yeah, that's the name!
Milkweed?
Nice Pictures....
That was such a nice day, especially when the sun was out.