Teaching a Class of Undergrads, RStudio Server, and My Ubuntu Machine

I was chatting about public speaking with my brother, who is a Lecturer in the Faculty of Pharmacy at UofT, when he offered me the opportunity to come to his class and teach about R.  Always eager to spread the analytical goodness, I said yes!  The class is this Friday, and I am excited.

For this class I’ll be making use of RStudio Server, rather than having to get R onto some 30 individual machines.  Furthermore, I’ll be using an installation of RStudio Server on my own home machine.  It gives me more control and the convenience of configuring things late at night when I have the time to.

While playing around with the server on my computer (connecting via my own browser) I noticed that for each user you create, a new package library gets built.  That’s too bad as it relates to this class, because it would be neat for everyone to be able to make use of additional packages like ggplot2, dplyr and such, but this is an extremely beginner class anyway.

I’ve signed up for a dynamic dns host name from no-ip.com, and have set the port forwarding on my router accordingly, so that seems to be working just fine.  I just hope that nothing goes wrong.  I need to remember to create enough accounts on my ubuntu machine to accommodate all the students, which will be a small pain in the you-know-what, but oh well.

As for the data side of things, I’ve compiled some mildly interesting data on drug-related deaths by council area in scotland, geographical coordinates, and levels of crime, employment, education, income and health.  I only have an hour, so we’ll see how much I can cover!  Wish me luck.  If you have any advice, I’d be happy to hear it.  I’ve already been told to start with graphics 🙂

Advertisements

13 thoughts on “Teaching a Class of Undergrads, RStudio Server, and My Ubuntu Machine

  1. Pingback: Teaching a Class of Undergrads, RStudio Server, and My Ubuntu Machine | Patient 2 Earn

  2. Regarding the libs: I think it there is no need to install packages into the personal libs of every student. In the conf of the RStudio server you can specificy a global library (I believe there is already one specified by default). If a library is present at the RStudio server site every student can load the package. So basically you have two libs (a global and a personal) and if e.g. ggplot2 is installed into the RStudio server lib on your “home server” it will be available to all. (at least this is the way RStudio Server works in our network).
    You can have a look for specifying libs locations here:
    http://www.rstudio.com/ide/docs/server/configuration

  3. If you only have an hour, I would definitely spend my time trying to entice students into continuing with R. By far one of the most impressive showcases of R is, as you know, r-bloggers. Some of the amazing content produced ranges from pure mathematical (LeMonde Puzzles) to amazing visualizations, and across a stream of subject matter. Personally, I love the ability of quickly analyzing even personal data such as finances or hours spent on different tasks, at a scientific level!

  4. Is it possible to ask for help in the installation process? I mean…I can handle the R studio installing in my linux mint desktop pc, but have no luck in any attemp for server 😦
    Thanks to you on front!

    • I followed instructions on this page:

      http://www.rstudio.com/ide/download/server

      Then I set up port forwarding on my router using port 8787, and got myself registered with no-ip.com. You can download a client from no-ip that sends them updates as to your ip address whenever your computer logs on. That way all people need to connect to from the outside is your dynamic dns host name.

      Cheers!

  5. If you install the packages as root, they will be available for everyone. Simply run R from command line as root user and install everything you need to be installed.

    • I tried what you said. I ran R from the command line as root and installed what I wanted to install. My packages weren’t available to the other users I’ve set up 😦

      • Did you run “sudo R”, or “sudo su” then “R”?
        I did the second one and it worked perfect for me….

      • Regrettably, I ended up copying the packages I wanted to all 30 R library directories 😦 oh well, at least I’m ready for the session now!

  6. I use R extensively in my work as a Research Prof. in Pharmacology & Toxicology. Like you, I run my programs mainly on Linux, which always works for me, though most also run well on Win7, As Salil mentioned above one of the great things about R is R-bloggers and all of the info that a newbie can access on the web. Beyond the graphics, it’s also important to get one’s data analyzed so it can be plotted. In addition to the standard stats packages, pharm students will likely be interested in package drc (dose-response curves), plyr or dplyr and various non-parametric analysis programs for data that doesn’t fit the assumptions of standard ANOVA.
    Sounds like a great class.
    Rob Ralston
    Univ. Kansas Med. Ctr.

  7. Hi, I taught some parts of my R class using an Amazon instance of Rstudio specifically those classes involving Sweave and building packages. I got so tired of troubleshooting LaTex installations on 30 different MS Windows machines. Once I got it all working on AWS I’m never going to do it any other way. Might I ask what topics you are going to teach the undegrads ? I’ve been teaching at the graduate level although I’m trying to recalibrate the material for undergrads. Let me know if you want to check out my site for my class and I can give you the URL.

    • It’s a very introductory level class. I’ll be using a dataset I put together from several sources on drug-related deaths in Scotland by Council Area and explaining concepts as we explore the dataset (transforming variables, merging data frames, graphing distributions, summary statistics, graphing relationships between variables, statistical tests). I only have an hour, so I won’t be able to do too much :$

  8. Pingback: UofT R session went well. Thanks RStudio Server! | Data and Analysis with R, for Fun (and Maybe Work!)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s