For the time being, the main part of this online course will be this README.md file. It is set up as a potential R package, though, and I may implement that later.
The color figure at the top of this file was generated by our
prVis package,
run on a famous dataset called Swiss Roll.
Nonpassive learning is absolutely key! So even if the output of an R command is shown here, run the command yourself in your R console, by copy-and-pasting from this document into the R console. You will get out of this tutorial what you put in.
Similarly, the Your Turn sections are absolutely crucial. Devise your own little examples, and try them! “When in doubt, Try it out!” is a motto I devised for teaching. If you are unclear or curious about something, try it out! Just devise a little experiment, and type in the code. Don’t worry — you won’t “break” things.
Tip: I cannot teach you how to program. I can merely give you the tools, e.g. R vectors, and some examples. For a given desired programming task, then, you must creatively put these tools together to attain the goal. Treat it like a puzzle! I think you’ll find that if you stick with it, you’ll find you’re pretty good at it. After all, we can all work puzzles.
You’ll need to install
R,
from the R Project site. Start up R,
either by clicking an icon or typing R in a terminal window. We are
not requiring RStudio here, but if you already have it, start it; you’ll
be typing into the R console, the Console pane.
As noted, this tutorial will be “bare bones.” In particular, there is
no script to type your command for you. Instead, you will either
copy-and-paste from the text here into the R console, or type them there
by hand. (Note that the code lines here will all begin with the R
interactive prompt, >; that should not be typed.)
This is a Markdown file. You can read it right there on GitHub, which has its own Markdown renderer. Or you can download it to your own machine in Chrome and use the Markdown Reader extension to view it (be sure to enable Allow Access to File URLs).
When you end your R session, exit by typing quit().
Good luck! And if you have any questions, feel free to e-mail me, at matloff@cs.ucdavis.edu