Christopher W Ryan | 18 Apr 04:46 2012

introducing R to high school students

I participate peripherally on a listserve for middle- and high-school
science teachers. Sometimes questions about graphing or data analysis
come up. I never miss an opportunity to advocate for R. However, the
teachers are often skeptical that their students would be able to
issue commands or write a little code; they think it would be too
difficult. Perhaps this stems from the Microsoft- and
spreadsheet-centered, pointy-clicky culture prevalent in most US
public schools. Then again, I have little experience teaching this age
group, besides my own kids and my Science Olympiad team, so I respect
their concerns and expertise.

I don't know yet what software they generally use, but I suspect MS
Excel and SPSS.

Now I have to put my money where my mouth is. I've offered to visit a
high school and introduce R to some fairly advanced students
participating in a longitudinal 3-year science research class.

I anticipate keeping things very simple:
--objects and the fact that there is stuff inside them. str(), head(), tail()
--how to get data into R
--dataframes, as I imagine they will mostly be using single,
"rectangular" datasets
--a lot of graphics (I can't imagine that  plot(force, acceleration)
is beyond a high-schooler's capability.)
--simple descriptive statistics
--maybe t-tests, chi-square tests, and simple linear regression.

Alas, probably more than we would have time to cover.

(Continue reading)

R. Michael Weylandt | 18 Apr 04:51 2012
Picon

Re: introducing R to high school students

In addition to whatever feedback you may get here, you might subscribe
to the SIG-Teaching list for another interested population.

Michael

On Tue, Apr 17, 2012 at 10:46 PM, Christopher W Ryan
<cryan <at> binghamton.edu> wrote:
> I participate peripherally on a listserve for middle- and high-school
> science teachers. Sometimes questions about graphing or data analysis
> come up. I never miss an opportunity to advocate for R. However, the
> teachers are often skeptical that their students would be able to
> issue commands or write a little code; they think it would be too
> difficult. Perhaps this stems from the Microsoft- and
> spreadsheet-centered, pointy-clicky culture prevalent in most US
> public schools. Then again, I have little experience teaching this age
> group, besides my own kids and my Science Olympiad team, so I respect
> their concerns and expertise.
>
> I don't know yet what software they generally use, but I suspect MS
> Excel and SPSS.
>
> Now I have to put my money where my mouth is. I've offered to visit a
> high school and introduce R to some fairly advanced students
> participating in a longitudinal 3-year science research class.
>
> I anticipate keeping things very simple:
> --objects and the fact that there is stuff inside them. str(), head(), tail()
> --how to get data into R
> --dataframes, as I imagine they will mostly be using single,
> "rectangular" datasets
(Continue reading)

Indrajit Sengupta | 18 Apr 05:28 2012
Picon

Re: introducing R to high school students

Hi Chris,
 
I am not sure, whether introducing R to High School students would be a good idea as I feel we
should encourage students to sketch the graphs in paper to get their concepts right. Excel is fine, but -
if I write an equation on the board, will the student be able to visualize its graph? Allowing students to
use software to plot graphs at a very early age may hinder that learning. What I would focus on (as the
teacher pointed out - that they may not be able to write code) - is being able to write simple codes to get
a grasp on programming (they can use QBASIC which is one of the simplest programming softwares). 
 
R to my mind should be introduced at an undergraduate level - where they are able to use its real power
(vectors, matrices, graphics etc.). 
 
Thats my view :)
 
Regards,
Indrajit
 
 

________________________________
From: Christopher W Ryan <cryan <at> binghamton.edu>
To: R-help <R-help <at> r-project.org> 
Sent: Wednesday, April 18, 2012 8:16 AM
Subject: [R] introducing R to high school students

I participate peripherally on a listserve for middle- and high-school
science teachers. Sometimes questions about graphing or data analysis
come up. I never miss an opportunity to advocate for R. However, the
teachers are often skeptical that their students would be able to
issue commands or write a little code; they think it would be too
(Continue reading)

Tyler Rinker | 18 Apr 17:09 2012
Picon

Re: introducing R to high school students


Indrajit,
As a former math teacher I understand your concerns wholly.  My perspective is that this must be
approached with caution so you don't miss out on the important learning but I think with
proper guidance and scaffolding this could be an amazing tool.  We already using the
graphing capabilities of the TI-(insert number here) to demonstrate graphing problems, why not put
a sophisticated tool in their hands that may be very useful to them in the future and at least introduce them
to programming.  Students are capable of some pretty cool and creative things if we give them the tools
and support to allow them to be creative (I mean which one of use didn't program out ti-81s to play video games?).
Your point of the learning being hindered isn't lost.  This has to be approached delicately so R isn't just
another program spitting out answers/graphs.  Chris's question sounds like a one time intro thing so
this may be a moot pint, however if the R learning is more long term, I would suggest some sort of lab set up
(maybe a "lab day") each week that augments and compliments the standard curriculum.  One thing I may
advise against is the  "--maybe t-tests, chi-square tests, and simple linear regression." as this is
usually far beyond the scope of high school curriculum (at least to my knowledge). 
Could I also suggest you do some eye candy (not much but some) where you show a few of the things R is
capable of to get their interests peaked (I consider this like playing guitar; I learned it because
Hendrix played sweet stuff not because I liked playing basic chords and scales; I plugged through the
elementary stuff because I knew Hendrix, Clapton, and Page were within my grasp if I kept going).  Here's
a few suggestions:http://paulbutler.org/archives/visualizing-facebook-friends/
http://blog.revolutionanalytics.com/2012/01/nyt-uses-r-to-map-the-1.html
http://blog.revolutionanalytics.com/2009/11/choropleth-challenge-result.html
http://www.r-bloggers.com/visualize-your-facebook-friends-network-with-r/
http://www.r-bloggers.com/see-the-wind/
http://www.r-bloggers.com/mapped-british-and-spanish-shipping-1750-1800/

And also I'd introduce them to Anthony Damico's "r twotorials" as it provides catchy short tutorials on how
to do basic stuff:http://www.twotorials.com/2012/04/

I wish I knew R when I was a math teacher and applaud any effort to engage students in authentic learning
(Continue reading)

Richard M. Heiberger | 18 Apr 05:57 2012
Picon

Re: introducing R to high school students

Christopher,

I suggest that you look at R through Excel.  This is a Springer book that
Erich Neuwirth and I wrote.  It is designed as a computational supplement to any
introductory Statistics book.  It uses Erich's RExcel to give either
menu access to R
from Excel (using Rcmdr embedded into the Excel menu system), or by placing any
R function inside the Excel automatic recalculation model.

RExcel is available either in the RExcelInstaller package from CRAN,
or fully integrated into
a complete R system from rcom.univie.ac.at.  Go to the Downloads page
and download
the current RAndFriends installer.

We have discussions on using RExcel in the classroom in the Literature
and presentations
section on the Wiki page at the rcom site.
Several of the links are to papers at the UseR! conferences.  This one
specifically addresses
teaching:
http://www.r-project.org/useR-2006/Slides/BaierEtAl.pdf
Baier, T., Heiberger, R., Neuwirth, E., Schinagl, K., Grossmann, W.
(2007). Using R for teaching statistics to nonmajors: Comparing
experiences of two different approaches. Paper presented at the UseR
2006, Vienna.

Rich

On Apr 17, 2012, at 22:46, Christopher W Ryan <cryan <at> binghamton.edu> wrote:
(Continue reading)

Gabor Grothendieck | 18 Apr 06:44 2012
Picon

Re: introducing R to high school students

On Tue, Apr 17, 2012 at 10:46 PM, Christopher W Ryan
<cryan <at> binghamton.edu> wrote:
> I participate peripherally on a listserve for middle- and high-school
> science teachers. Sometimes questions about graphing or data analysis
> come up. I never miss an opportunity to advocate for R. However, the
> teachers are often skeptical that their students would be able to
> issue commands or write a little code; they think it would be too
> difficult. Perhaps this stems from the Microsoft- and
> spreadsheet-centered, pointy-clicky culture prevalent in most US
> public schools. Then again, I have little experience teaching this age
> group, besides my own kids and my Science Olympiad team, so I respect
> their concerns and expertise.
>
> I don't know yet what software they generally use, but I suspect MS
> Excel and SPSS.
>
> Now I have to put my money where my mouth is. I've offered to visit a
> high school and introduce R to some fairly advanced students
> participating in a longitudinal 3-year science research class.
>
> I anticipate keeping things very simple:
> --objects and the fact that there is stuff inside them. str(), head(), tail()
> --how to get data into R
> --dataframes, as I imagine they will mostly be using single,
> "rectangular" datasets
> --a lot of graphics (I can't imagine that  plot(force, acceleration)
> is beyond a high-schooler's capability.)
> --simple descriptive statistics
> --maybe t-tests, chi-square tests, and simple linear regression.
>
(Continue reading)

Bert Gunter | 18 Apr 07:38 2012

Re: introducing R to high school students

<...snipped>

>> I anticipate keeping things very simple:
>> --objects and the fact that there is stuff inside them. str(), head(), tail()
>> --how to get data into R
>> --dataframes, as I imagine they will mostly be using single,
>> "rectangular" datasets
>> --a lot of graphics (I can't imagine that  plot(force, acceleration)
>> is beyond a high-schooler's capability.)
>> --simple descriptive statistics
>> --maybe t-tests, chi-square tests, and simple linear regression.
>>
>
> I have some experience in this and would have to agree with Indrajit
> that this is not a good idea.
>
> When I tried to teach R to a high school student it was not very
> successful.  Certainly based on that experience the list above is way
> too complex.  Don't teach anything on that list at all.  The number of
> concepts involved in that is simply overwhelming.

Oh amen amen!

I'd go farther: It's overwhelming for college students.

Farther yet: I've met very few scientists and engineers who understand
what a standard deviation is. Fewer still who understand the
difference between a sample statistic and a population parameter for
which it's an estimate.

(Continue reading)

Christopher W. Ryan | 18 Apr 16:25 2012

Re: introducing R to high school students

Thanks all for the excellent thought-provoking comments.

I want to clarify that these students are, for good or for ill, already
doing all these analytical and graphical things for their projects. They
are doing them with Excel and SPSS. One of my goals would be to teach
them how they can be done (and I think done better) in R. Better for
many reasons, not least of which is the reproducibility offered by lines
of saved code.

It seems that many (not all) on the list agree with the science teachers
that R is too difficult for high school students. Is R intrinsically
more difficult to learn than commercial spreadsheet software? If so,
why? Or is the issue that it is difficult to change to R after many
years experience in the mind-set of spreadsheets? If a child was
"brought up" on R for math/stats, in a developmentally progressive way,
instead of Excel or a graphing calculator, would he/she perceive it as
difficult?

Are the intrinsic cognitive differences between high schoolers, college
students, and graduate students substantial enough to explain why the
last can learn R and the first can't? Or is it a matter of exposure,
opportunity, etc?

Indrajit, I'm curious: given your preference for hand-drawn graphs for
learners (a very good point), why is Excel "fine" but R not?

At any rate, I should probably migrate this thread over to the Teaching
SIG listserve, which I didn't know about before.

Thanks again.
(Continue reading)

Steve_Friedman | 18 Apr 17:01 2012

Re: introducing R to high school students

Christopher,

I originally thought about  writing off list to avoid a plethora of babble.
However here goes.

I don't see any reason why good students can 't learn the fundamentals of
R.  It has lots of advance methods that perhaps are too complex to handle
for younger - less experienced people. On the other hand, if your students
are engaged and already doing graphs and other spreadsheet applications
than why not go ahead and experiment with some of the functionality R has
to offer.

The critics seem to forget that inner city kids in CA were exceptional in
their ability to learn advanced placement calculus when pushed to learn.
The US lags far behind the international community in math skills, so if R
can help them catch up, go ahead and give it a try.

I'd pick some elementary concepts first to allow them to become familiar
with the software.  A series of exercises in learning what a vector is,
then how vectors can  contain more than one attribute.  Show then how, to
add column, how to add rows, develop simple arithmetic problems, etc.  then
move to data.frames and perhaps, lists with mixed numeric and categorical
attributes. Demonstrate the apply functions, trellis (or lattice) and
scatter plots etc.

My two cents,

Steve Friedman Ph. D.
Ecologist  / Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
(Continue reading)

Jeff Newmiller | 18 Apr 18:31 2012
Picon
Picon

Re: introducing R to high school students

I think that mostly avoiding the statistics and matrix capabilities is wise. You might want to (re-)read
Burns' article on Spreadsheet Addiction for help in justifying the effort required to learn R.

In that vein, there is a classic experiment where a small ball is rolled down an inclined pane and the time
required to roll various distances is measured. One way to investigate fitting this data is to square the
time in the spreadsheet. (The other is to use the built-in polynomial regression.) If there is a missing
value in the input time, the squared cell will be zero. You can overcome this by manually putting an =NA() in
the missing cell, but that is tedious when there is lots of data, and it gets even more tedious when you want
to throw out the whole data record while remembering which records were used in the final analysis. R
allows this and similar steps to be automated.

I also think running some examples of plots like tiled layouts, colored maps, boxplots, or 3d interactive
cloud graphs may provide good brainstorming material for data representation.
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil <at> dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

"Christopher W. Ryan" <cryan <at> binghamton.edu> wrote:

>Thanks all for the excellent thought-provoking comments.
>
>I want to clarify that these students are, for good or for ill, already
>doing all these analytical and graphical things for their projects.
>They
>are doing them with Excel and SPSS. One of my goals would be to teach
(Continue reading)

David Winsemius | 18 Apr 19:25 2012
Picon
Picon

Re: introducing R to high school students


On Apr 18, 2012, at 12:31 PM, Jeff Newmiller wrote:

> I think that mostly avoiding the statistics and matrix capabilities  
> is wise. You might want to (re-)read Burns' article on Spreadsheet  
> Addiction for help in justifying the effort required to learn R.
>
> In that vein, there is a classic experiment where a small ball is  
> rolled down an inclined pane and the time required to roll various  
> distances is measured.

I'll say it's classic. First done by Galileo: http://www.u-picardie.fr/~dellis/Documents/PhysicsEducation/Reconstruction%20of%20Galileo%20Galilei.pdf

> One way to investigate fitting this data is to square the time in  
> the spreadsheet.

Another way is to examine first and second differences in distances  
reached after successive equal intervals. The diff() function is  
rather handy in this effort.

Back to the matter at hand, ... I see no convincing reason to consider  
R any more complex as a computer language than is Logo. The suggestion  
to use color in graphics output seems to be in accord with what I have  
seen as far as pedagogic recommendations for using Logo as a teaching  
platform.

--

-- 
David Winsemius.

> (The other is to use the built-in polynomial regression.) If there  
(Continue reading)

Indrajit Sengupta | 22 Apr 05:29 2012
Picon

Re: introducing R to high school students

Chris,
 
Don't get me wrong - I have nothing against learning R at an early age. However, I feel at a school level, the
focus should be a bit more on programming. Here are some reasons why would not recommend R at school level:
 
1. At school we seldom deal with lot of data - the focus is more on concepts. Excel is an excellent tool and no
matter how much we love or hate it - we will be using Excel a lot in our lives.
 
2. R language is a very high level language. To get a good grasp on programming - I would recommend any
one of QBASIC, C or JAVA (Java might be a bit too much given OOP is not easy). Learn stuff the hard way - that way
your fundamentals get strong. Even Excel VBA is a very powerful language - if you can incorporate that in
your course - nothing like it. You will be churning out data scientists from your school.
 
3. The danger of introducing R too early - similar to introducing calculators to kids who are learning basic
mental maths. They get too dependent on tools
 
Hope this clears my point of view.
 
Regards,
Indrajit
 

________________________________
From: Christopher W. Ryan <cryan <at> binghamton.edu>
To: R-help <R-help <at> r-project.org> 
Sent: Wednesday, April 18, 2012 7:55 PM
Subject: Re: [R] introducing R to high school students

Indrajit, I'm curious: given your preference for hand-drawn graphs for
learners (a very good point), why is Excel "fine" but R not?
(Continue reading)

Rolf Turner | 22 Apr 05:55 2012
Picon

Re: introducing R to high school students

On 22/04/12 15:29, Indrajit Sengupta wrote:

<SNIP>
> 1. At school we seldom deal with lot of data - the focus is more on concepts. Excel is an excellent tool
     That is at best debatable, and IMHO just plain incorrect.  I firmly 
believe
     that Excel is a ***TERRIBLE*** tool.
> and no matter how much we love or hate it - we will be using Excel a lot in our lives.

     This is not (unfortunately IMHO) debatable.  It is all too sadly 
true.  For most
     people at least.  (Not for my very good self.  I can get away with 
eschewing
     Excel.  Most people are not lucky enough to have that option.)

<SNIP>

     I think much of the remainder of the post was highly disputable as 
well,
     but I will desist at this point.

         cheers,

             Rolf Turner

Indrajit Sengupta | 22 Apr 06:45 2012
Picon

Re: introducing R to high school students

Why do you think Excel is a terrible tool? In what ways have you tried to use Excel and it has failed you?
 
Regards,
Indrajit

________________________________
From: Rolf Turner <rolf.turner <at> xtra.co.nz>

Cc: R-help <R-help <at> r-project.org> 
Sent: Sunday, April 22, 2012 9:25 AM
Subject: Re: [R] introducing R to high school students

On 22/04/12 15:29, Indrajit Sengupta wrote:

<SNIP>
> 1. At school we seldom deal with lot of data - the focus is more on concepts. Excel is an excellent tool
    That is at best debatable, and IMHO just plain incorrect.  I firmly believe
    that Excel is a ***TERRIBLE*** tool.
> and no matter how much we love or hate it - we will be using Excel a lot in our lives.

    This is not (unfortunately IMHO) debatable.  It is all too sadly true.  For most
    people at least.  (Not for my very good self.  I can get away with eschewing
    Excel.  Most people are not lucky enough to have that option.)

<SNIP>

    I think much of the remainder of the post was highly disputable as well,
    but I will desist at this point.

        cheers,
(Continue reading)

Hadley Wickham | 18 Apr 19:36 2012

Re: introducing R to high school students

> Now I have to put my money where my mouth is. I've offered to visit a
> high school and introduce R to some fairly advanced students
> participating in a longitudinal 3-year science research class.
>
> I anticipate keeping things very simple:
> --objects and the fact that there is stuff inside them. str(), head(), tail()
> --how to get data into R
> --dataframes, as I imagine they will mostly be using single,
> "rectangular" datasets
> --a lot of graphics (I can't imagine that  plot(force, acceleration)
> is beyond a high-schooler's capability.)
> --simple descriptive statistics
> --maybe t-tests, chi-square tests, and simple linear regression.

I think those are good topics to cover, but the order is wrong - start
with graphics.  They are immediately useful and you can start with
built in datasets (although I'd recommend finding a package with more
interesting/bigger datasets than the base packages).  Once you've
shown them how to use graphics to understand data you can talk more
about how it works - what is a dataframe, how you load data in R, etc.

That's the path I follow when I teach R (http://stat405.had.co.nz/,
http://vita.had.co.nz/papers/assessment.html), and I find it to be
successful at keeping students motivated enough to work through the
initial frustrations of learning a new language.  R is not too
difficult for high-school students to learn, but you need to make sure
you provide them with tools to do things that they're interested in -
finding interesting problems that they _want_ to solve is most of the
battle.

(Continue reading)

William Dunlap | 18 Apr 20:12 2012

Re: introducing R to high school students


> -----Original Message-----
> From: r-help-bounces <at> r-project.org [mailto:r-help-bounces <at> r-project.org] On Behalf
> Of Hadley Wickham
> Sent: Wednesday, April 18, 2012 10:37 AM
> To: Christopher W Ryan
> Cc: R-help
> Subject: Re: [R] introducing R to high school students
> 
> > Now I have to put my money where my mouth is. I've offered to visit a
> > high school and introduce R to some fairly advanced students
> > participating in a longitudinal 3-year science research class.
> >
> > I anticipate keeping things very simple:
> > --objects and the fact that there is stuff inside them. str(), head(), tail()
> > --how to get data into R
> > --dataframes, as I imagine they will mostly be using single,
> > "rectangular" datasets
> > --a lot of graphics (I can't imagine that  plot(force, acceleration)
> > is beyond a high-schooler's capability.)
> > --simple descriptive statistics
> > --maybe t-tests, chi-square tests, and simple linear regression.
> 
> I think those are good topics to cover, but the order is wrong - start
> with graphics.  They are immediately useful and you can start with
> built in datasets (although I'd recommend finding a package with more
> interesting/bigger datasets than the base packages).  Once you've
> shown them how to use graphics to understand data you can talk more
> about how it works - what is a dataframe, how you load data in R, etc.
> 
(Continue reading)

Hadley Wickham | 18 Apr 21:39 2012

Re: introducing R to high school students

> If the students are in a "science research" class, does that mean they
> have data from their own research that they would want to understand
> better?  I think that would be much more motivating than anything else.

It might depends on the class - most high school science experiments
aren't that compelling.  Depending on the audience you might find
publicly available datasets to be more interesting - there's plenty of
stuff on sports, console games, ... that they might find more
interesting.

>  "If you want to build a ship, don't drum up the men to gather wood,
>   divide the work and give orders. Instead, teach them to yearn for the
>   vast and endless sea."  [Antoine de St. Exupery]

Exactly - I love that quote.

Hadley

--

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/

Kjetil Halvorsen | 19 Apr 16:40 2012
Picon

Re: introducing R to high school students

see below.

On Wed, Apr 18, 2012 at 2:39 PM, Hadley Wickham <hadley <at> rice.edu> wrote:
>> If the students are in a "science research" class, does that mean they
>> have data from their own research that they would want to understand
>> better?  I think that would be much more motivating than anything else.
>
> It might depends on the class - most high school science experiments
> aren't that compelling.

Yes. But then , one should try to give them ideas for better experiments!

One thing I would want to do is learn them the basics (very____ basics!) of
factorial experiments, and then let them use it for bettering the
design of, foe example,
paper planes. (or they could make soap in the chem lab and use
factorial experiments to better the process)

Kjetil

 Depending on the audience you might find
> publicly available datasets to be more interesting - there's plenty of
> stuff on sports, console games, ... that they might find more
> interesting.
>
>>  "If you want to build a ship, don't drum up the men to gather wood,
>>   divide the work and give orders. Instead, teach them to yearn for the
>>   vast and endless sea."  [Antoine de St. Exupery]
>
> Exactly - I love that quote.
(Continue reading)


Gmane