Christopher W. Ryan
2013-Jan-02 19:53 UTC
[R] follow up on teaching R to high school students
Some of you may recall that a few months ago I solicited advice and opinions on both R-help and R-sig-teaching about an "introduction to R" workshop I intended to present to a class of high school students enrolled in a 3-year longitudinal science research class. Much lively discussion ensued. Well, I did the workshop on 8 November, and thought I'd give some follow-up as to how it went, in case anyone was interested. The class consisted of about 20 kids, grades 10-12. Each was at a computer with R installed. It wasn't clear that the students would be able to install packages, given the school's network setup, so I confined my plans to base R. We ran for 5 hours, with about a 40-minute break for lunch. Their science teacher was present for the entire time, and the school's IT person attended about half of it. They were both very helpful, both in preparation and in execution. I conducted an (utterly arbitrary and unvalidated) online survey among the students a couple weeks in advance, to gauge their familiarity with what I called "technical computing," i.e. anything beyond commonplace word-processing, spreadsheets, web surfing, and social media. The questions were: 1. What operating systems do you know how to work in? Check all that apply. Windows 19 Mac OS X 12 Linux 2 others 0 2. Do you have a favorite text editor? Yes 5 No 7 I don't know what a text editor is 7 3. Do you use a two-pane file manager? Yes 1 No 6 I don't know what a two-pane file manager is 12 4. Have you written programs in any computer language? Yes 4 No 11 I don't know 4 (the specific languages cited included Basic, Java, Javascript, Ruby, C++, Python, MS-DOS command prompt batch files.) I had my "lesson plan" all laid out in an org-mode file, from which I typed code into an R console projected on the screen. The students followed my steps initially, and then broadened out to some experimentation as the day went on. A couple students were quite skilled at working ahead, while others struggled a bit, but everyone was eventually able to get the desired results. They were generally very engaged, interactive, and enthusiastic. No one left, except for the odd music lesson here and there. Overall, we had a lot of fun. I tried to go pretty slowly. I prepared much more that we had time to cover. I emphasized graphics. I did not get into inferential statistics or hypothesis testing at all, despite their eagerness to "do a t-test" and such. Maybe that will come at a future session, if we do one. In general, topics we covered included: vectorized mathematics (what I called "bulk math") generating sequences (meant to do logical conditions here, but skipped it inadvertantly) drawing random samples different kinds of objects (we limited ourselves to scalars, vectors, dataframes; character, numeric, and factor) levels of measurement: nominal, ordinal, interval/ratio exploring objects: str(), head(), tail(), class(), summary() using in-built data sets provided with R general principles of good data entry and storage, and the virtues of plain text. Went over read.table (I meant to do more with reading data into R, but ran out of time. I sent simple instructions for the foreign package and read.spss() to their teacher after the fact, since up until now they had been using SPSS a lot, and several of their data sets were in that format.) graphs: boxplots, scatterplots, stripcharts, scatterplot matrices, and coplots (they liked that last one a lot). Also some graphical parameters: type=, main=, sub=, col=, xlim=, ylim=, and pch Comments to teacher over the subsequent couple of days included: "This should be taught in high school." "I got to see data for the first time in a different way." "I had the most fun when I realized I could play around with the program." (Of course, any less-than-positive comments, the students (or their teacher) may have kept to themselves out of courtesy to me!) A post-workshop survey of the students has just begun, basically asking them if they have downloaded R on their own computers, and whether they have used it in any way since the workshop. --Chris -- Christopher W. Ryan, MD, MS SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu