Welcome. Paul Johnson's Desultory Collection of Rtips and Guidance

At the very bottom of the page, you should see the "raw" list of files and directories. Sometimes I upload things and forget to create "links" for them in this README file. If I forget, you can still find what you need at the bottom.

Rtips

The official home of the new and improved Rtips is here, in pdf and "html! Rtips was my first effort to accumulate user-guide material for R, mostly because I could not remember details while translating from SAS to R. That effort started before the turn of the century, well before the world became awash in introductory guides, tip-sheets, and primer books for R.

As a joke, I used to call this "StatsRus", but I stopped because it seemed presumptuous to make "me" part of "us". But I still think it was a funny title.

WorkingExamples of R Code

The best way to learn R is to solve specific problems. In order to solve specific problems, it is necessary to isolate them and make them re-producible. In order to ask for help in the r-help email list, it is necessary to provide a self contained, focused example. (This is emphasized in the r-help email list Posting Guide). I thought that was a good idea, we did the same with the Swarm support project in the early part of this century. Thus, I have a folder "WorkingExamples". In 2013, I made some effort to rename those examples in a more organized way and the top of each one has (or will have) a little explanation.

These are things you can actually run and get smart from. The one on barplots is so incredibly awesome, you won't believe it when you see it. As my skills in R programming have improved, I notice these WorkingExamples are becoming a little more elaborate. And you will notice that, when I'm troubled about something, the examples prolifate. Look at plot-plotmath-* for example.

Vignettes from the rockchalk R package

In late 2011, I created an R package called "rockchalk". That's available on CRAN now. CRAN is for major releases, testing version is available on my server, http://rweb.quant.ku.edu/kran. (run "install.packages("rockchalk", repos="http://rweb.quant.ku.edu/kran", type = "source") to get the testing version. I work on that mainly in the Spring, when I'm teaching regression.

The rockchalk package builds on the little bits of knowledge in Rtips, and it offers some more complete regression-oriented functions to process fitted models into output for papers. Distributed with rockchalk, there is an examples folder, and there are some examples there that might help you understand R programming. In the rockchalk package's install folder, look for files "nowords-*.R" for some R programming insights.

The vignettes from rockchalk are

  1. rockchalk: A survey of fuctions in rockchalk.
  2. RStyle: A style guide for R aimed at people who have basic R user skills and need to become R programmers
  3. Rchaeology: That's a pithy name, don't you think? It includes "deep insights" and programming advice that reflects the customs and mannerisms of the R leaders.

Rockchalk Webinar, hosted by Orange County R User Group (OCRUG)

On September 27, 2013, I was delighted/honored to participate in a Webinar on rockchalk, graciously hosted by Ray DiGiacomo, president of the OCRUG. The screen cast of the recording is in Quicktime format, in the file Webinar-OCRUG-20130927/rockchalk_2013-09-27.zip which you can download, decompress, and watch (over and over!). The slides themelves are in the same directory, in a file called rockchalk-slides.pdf.

There are 2 R files to note in the same directory.

  1. rockchalk-slides.R.

    The Sweave process that generates the slides also creates an R code file that one could use to replicate the analysis.

  2. curve-example-1.R. Code to "walk through" the demo discussed in the last 10 minutes of the Webinar.
  3. I may make revisions to those slides for other presentations, so the slides that were used on Sept. 27 will remain in the Webinar folder here, while the changing version will be in the location mentioned in the Webinar itself, which was in my "guides" directory, under Rcourse/rockchalk-2013.

Lectures & guides

I've re-located my lectures on R and stats and computing to this area:

http://pj.freefaculty.org/guides

Most of these are LaTeX, many are Sweaved to combine R with the document. I'm uploading everything here, the source code, anything necessary to reproduce the pdf lectures. I'm offering this as a free service, free for reuse to anybody as long as they acknowledge where they took the material.

  1. Rcourse. http://pj.freefaculty.org/guides/Rcourse. The sub-heading "Rcourse" includes the lectures that are primarily about R (apart from the statistical background)
  2. stat. http://pj.freefaculty.org/guides/stat. Stats lectures, most of which use R and Sweave. The primary emphasis is on statistical applications and interpretation. The difference between the two is sometimes hard to describe (its mostly audience dependent).
  3. Computing-HOWTO. http://pj.freefaculty.org/guides/Computing-HOWTO

If you are just beginning with R, I have prepared some very basic presentations for a group of undergraduate interns and I think they will help you get started. Please look at http://pj.freefaculty.org/guides/Rcourse/First-R.

Sweave Tutorial

During the Stats Camp at University of Kansas, a "camper" asked me for help in learning how to use Sweave. More recently, I've developed some notes on Sweave and Beamer presentations. That materials is now online LyX-sweave-tutorial, which shows the bare minimum steps needed to use Sweave.

I have a "LaTeX Get Started" document in the guides directory (read below). http://pj.freefaculty.org/guides/Computing-HOWTO/LatexAndLyx

Screencasts

I found myself walking through the same installs over and over with Windows users. So I made these screencasts to give people a head start. I don't hold these out as great production quality, but they do reflect a nearly week-long battle with a Windows 8 virtual machine, CamStudio, the hosts audio/video system. Its very tricky to keep the video and audio synced.

  1. StartR 01-Install R for Windows and ActivePerl
  2. http://youtu.be/pmK9bWG1ftk

    On a Windows 8 system, this demonstrates the R installation, basic usage, as well as the importation of an Excel spreadsheet using the gdata package's read.xls function, with the support of ActivePerl. Part 2 in this series discusses better editors for code preparation: http://youtu.be/lNlJFEpdytc

  3. StartR 02-Editors for R in Windows: Emacs (ESS), RStudio, Notepad++
  4. http://youtu.be/lNlJFEpdytc

    Installing and using programmer's file editors to interact with an R session. Demonstrates the installation, configuration, and usage to offer the viewer a clear view of what these editors offer. This is important because the editor provided with R for Windows does not offer conveniences for coders. This is the second presentation in a series, please view the first one, StartR 01, which is about installing R, ActivePerl, and R packages. http://youtu.be/pmK9bWG1ftk

PJ, 2013-05-31
      Name                    Last modified      Size  Description
Parent Directory - RUReady.pdf 24-Mar-2010 11:56 1.1M Rtips.pdf 24-Mar-2014 16:08 535K rockchalk.pdf 29-Jan-2015 07:50 407K Rchaeology.pdf 29-Jan-2015 07:50 326K statsRus.html 24-Mar-2014 16:08 233K Rtips.html 24-Mar-2014 16:08 233K Rstyle.pdf 29-Jan-2015 07:50 230K HEADER.html-bak 01-Oct-2013 13:17 6.7K or1-test.html 15-May-2013 15:26 1.0K rmdonrmd/ 27-Feb-2015 21:11 - gloating/ 26-Sep-2013 12:41 - WorkingExamples/ 28-Mar-2017 07:50 - Webinar-OCRUG-20130927/ 01-Oct-2013 13:33 - SystemAdmin/ 16-Jun-2016 10:09 - First-R/ 23-Mar-2017 07:49 -