Paul Johnson's 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 I maintain small, runable working
examples in the "WorkingExamples"
folder. I do that because I believe the best way to learn R is to
solve specific problems. It is necessary to challenges, develop
solutions, and make them re-producible. You can run these; get smart.
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
proliferate. Look at plot-plotmath-* for example.
This is also helpful for newcomers who need to learn how to ask
questions correctly in email support lists and Stack Overflow. In
order to ask for help, it is necessary to provide a self contained,
focused example. (This is emphasized in the r-help email list
I thought that was a good idea, we did the same with the Swarm support
project in the early part of this century.
My "WorkingExamples" now have HTML output as companion files. Perhaps
this makes it easier for students to understand what the results
I am now primary developer on several R packages. You can get the
latest and greatest from my package server. These things do go into
CRAN now and then, but CRAN is for occasional releases, not rapid
If you want access, the following stanza can be used to integrate
our KRAN updates with the standard CRAN offerings. As evidence of
my modesty, I also include a command that installs all of my
fine packages for you (smiley face!).
install.packages(c("stationery", "rockchalk", "kutils", "semTable",
All of these packages have "vignettes," essays about their
functions and results. They are provided with the packages. The
vignettes can be accessed from the online listings for the
packages on CRAN, of course, but I'm copying some highlights
into this directory for your inspection.
In late 2011, I created an R package called "rockchalk". That was
created because the graduate students in the stats course had trouble
keeping up with all of the R details needed to make nice looking
graphs and regression tables. The rockchalk package is a complete, end-to-end regression analysis
and reporting framework.
That's available on CRAN now. CRAN is for major releases, testing
version is available on my server, http://rweb.quant.ku.edu/kran.
The vignettes from rockchalk (see the file list below) are
In rockchalk, I also stashed some material I use for teaching in my
graduate R class. Distributed with rockchalk, there is an examples
folder. Students should look for files "nowords-*.R" for some R programming insights.
- outreg: A power tour of the regression
table making software
- rockchalk: A survey of fuctions in rockchalk.
- RStyle: A style guide for R aimed at
people who have basic R user skills and need to become R programmers
- 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.
Templates for R markdown and LaTeX files with integrated, consistent themes.
The 8 document types are
The stationery package includes 4 vignettes, but I've only uploaded
"stationery.pdf" in the file set below.
- HTML webpages prepared with Rmarkdown
- PDF guide documents prepared with Rmarkdown
- PDF report documents prepared with Rmarkdown
- PDF guide documents prepared with LaTeX/NoWeb using the knitr code chunk engine
- PDF guide documents prepared with LaTeX/NoWeb using the Sweave code chunk engine
- PDF report documents prepared with LaTeX/NoWeb using the knitr code chunk engine
- PDF report documents prepared with LaTeX/NoWeb using the Sweave code chunk engine
- PDF slides prepared with a KU customized Beamer slide template and the Sweave code chunk engine
This includes functions that we use in the Center for Research Methods
and Data Analysis. There are some super handy utilities, like
"file.backup()". Avoid accidental erasures! If you are ever saving a graph or table, run
file.backup() first to keep a copy of the previous version. The main
feature in kutils is the "Variable Key" data management framework.
That's described in a vignette included with the
package, The Variable Key Framework for
One of my major complaints about structural equation modeling (SEM)
has been the lack of a quick, standard method for generating tables
that can be included in reports. The graduate assistants here have
been accustomed to fitting models for a few days, and then spending
weeks to prepare tables. The semTable package is a self contained
solution for that problem. See semTable.
In Monte Carlo simulations, one of the practical problems is managing
the streams of random numbers across experiments.
portableParallelSeeds offers a workable method that has been employed
in many CRMDA projects as well as dissertations in the departments of
psychology and in the School of Education. See pps
("Portable Parallel Seeds").
Lectures & guides
Most of my course-oriented lectures on R and stats and computing are
Most of these are LaTeX, many are Sweaved to combine R with
the document. I'm uploading everything here, the source code,
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.
http://pj.freefaculty.org/guides/Rcourse. The sub-heading "Rcourse"
includes the lectures that are primarily about R (apart from the
- 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).
- 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.
In my job at the Center for Research Methods and Data Analysis at
KU, I've made several screen casts in support of guide documents
I've prepared. These can be accessed
through the CRMDA guides
The highlights for R that I have prepared are intended to
help Windows users get started with R in a productive way.
Windows Install Guides
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 put a couple of those on YouTube. Later, I put updated
versions in the CRMDA Web page. Please
where I hope you find the "big picture" on system configuration and
links to my Windows system guides.
If you check on YouTube, you'll find the older
ones, StartR 01-Install R for
Windows and ActivePerl and
StartR 02-Editors for R in Windows: Emacs (ESS), RStudio, Notepad++
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
There are 2 R files to note in the same directory.
The Sweave process that
generates the slides also creates an R code file that one could use to replicate
- curve-example-1.R. Code to
"walk through" the demo discussed in the last 10 minutes of the Webinar.
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 are
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).
Name Last modified Size Description
Parent Directory -
RUReady.pdf 2010-03-24 11:56 1.1M
or1-test.html 2013-05-15 15:26 1.0K
gloating/ 2013-09-26 12:41 -
HEADER.html-bak 2013-10-01 13:17 6.7K
Webinar-OCRUG-20130927/ 2013-10-01 13:33 -
Rtips.pdf 2014-03-24 16:08 535K
Rtips.html 2014-03-24 16:08 233K
statsRus.html 2014-03-24 16:08 233K
rmdonrmd/ 2015-02-27 21:11 -
SystemAdmin/ 2016-06-16 10:09 -
outreg.pdf 2019-04-19 08:21 387K
rockchalk.pdf 2019-04-19 08:21 444K
Rstyle.pdf 2019-04-19 08:21 230K
Rchaeology.pdf 2019-04-19 08:21 325K
variablekey.pdf 2019-04-19 08:22 224K
semtable.pdf 2019-04-19 08:22 221K
pps.pdf 2019-04-19 08:23 179K
upload.sh 2019-04-19 08:26 50
stationery.pdf 2019-04-19 08:28 384K
First-R/ 2020-08-12 08:04 -
WorkingExamples/ 2020-11-23 15:30 -