Introducing R to a non-programmer in one hour
alyssafrazee.com
alyssafrazee.com
1) Google says so: http://google-styleguide.googlecode.com/svn/trunk/Rguide.xml
2) It's the accepted convention of the language. When she looks things up of SO, they'll use it; if she looks at a package's source, they'll use it.
3) In RStudio it's "option+hypen" (Mac) to type the four-character " <- ", so no extra typing required.
4) Statistically-speaking, things like x = x + 1 makes no sense
5) You need "<<-" for the occasional global
6) 2 -> x
Also you can do things like this when you're bored:
((a <- b <- 1) + 1 -> c) + 1 -> d
(Someone also once told me that "=" for normal assignment sometimes fails in unexpected ways in tryCatch blocks, but I don't know how or why.)
But what you can get across, and the OP seems to have done this, is how accessible programming can be. I don't know about RStudio, but jumping into a REPL is easy enough in any modern languages, as is running a script. We take it for granted, but very very few people who haven't programmed realize that a "program" is simply composed of text. Hell. most people don't understand that about web pages.
So even if you won't teach much in an hour, overcoming that intimidation factor of "where/how do I even start?" is still pretty huge.
Nor did I. Which platform?
sdf/index.html
it auto-translated to this: sdf:index.html
(i'm assuming that's not a Sublime Text 3 thing, which is what I just tested on) #include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
int main()
{
int fd = creat("foo/bar", 1);
if (fd == -1) {
printf("error\n");
} else {
close(fd);
}
return 0;
}If there is a fail, his sister is a senior in sociology and she "must have" already done significant statistical analysis in class... right? At the very least did some averages using her calculator in high school or something? So there should be substantial opportunity for compare/contrast, assuming his sister is compatible with this learning technique and the author knows anything about what the sister already knows. That would make a remarkably awful non-specific general population introduction.
Also some focus on what she's doing... I did not find generic screwing around with R to be particularly challenging, I found "how do I connect R to my enormous database cluster in an intelligent fast simple way" to be a huge problem when starting out. OK I can average and std dev five hand entered numbers, that's very easy, now how about a complicated multi-site relational database with 1M records? She may have a totally different challenge, like all her raw data is CSV format or something.
R is fun once you climb that vertical learning curve wall at the start and generate your first live result. The learning curve is very easy after that first result.
Also I think its lame to check out bylines to make sure I run stuff thru the right sexism filter; I clearly stated its a "good" article; not "good, for a girl" article, or "not up to the manly standards of excellence" article.
You might not have belittled her because she's a woman, but simply assuming "Programming article = male by default" is in and of itself harmful.
It's in all likelihood an innocent mistake on your side - but the accumulation of those tiny things is, in the long run, "not fun"(tm). It doesn't matter that they're innocent mistakes, it matters that it is a constant thing.
So, please, don't consider this an attack, but a polite request to double-check the next time you make a gendered reference to somebody. Every time you do check, you'll have made life a tiny bit better for the women in the field.
There are tools (such as RHIPE) to connect R to multi-node Hadoop clusters so that complex statistical algorithms can be written in R and compiled as MapReduce jobs. This type of tool seems like what you wish R had, but we're a ways away from having this for every distributed data source...
It's an odd language, that makes assumptions neither group really hold dear to their heart, but it's also intensely useful.
R is really weird, but non-programmers are typically unaccustomed to precisely typing non-english into a computer. They aren't trained to quickly spot syntax errors or grok error messages.
But once the operations start getting more involved, I really start disliking Excel (or any spreadsheet). Excel shows the data but hides the formulas. At this point, I very much prefer a script.
I've never used it, but it looks quite nifty.
It would certainly be interesting to see something similar for R.