M-x eshellThe emacs shortcut on your DVD is set to start up in your network drive, which is drive H:. If your emacs shell starts on the DVD drive, you should change to a drive that you can write on/save files to.
C: cd %userprofile%or
H:Userprofile is your home directory on windows, and probably a reasonable place to start on your home computer. H is a shared drive on UT campus PCs. Anything saved on this drive will be available to you on any UT PC. Keep in mind, however, that you have only 50M (250M?) of space here. That is ample for all the R work you will do, but you might prefer to carry a flash drive, which will be F: in the Newton lab.
wget http://potis.org/~poti/tutorial/fisher.r
C-x C-f fisher.r
M-x R
You will probably also see the message 'timed out waiting for prompt.' Just wait. Reading from DVD is slower than ESS expects.
The above steps demonstrate emacs as an integrated environment for getting a file, opening a file, and the existence of emacs 'modes' which are triggered by the type of file being viewed. In particular, you can see that R mode, triggered by opening a file ending in .r (or .R), has syntax highlighting, indentation, and special menus and functions.
While you can get files in various ways from within R, using the shell has some advantages at this point:
C-x 2
C-x o
C-x b
Read ESS InfoYour screen will split into three screens. Keep in mind
C-x oso you can switch between them to try out the things you read in the Info.
At this point, stepping through code will probably be your most useful command. Use
C-c C-nto step through the code.
TAB
Try completion in the editing window
M-TAB
C-c C-vTry getting help on the rmultinom function in the fisher.r code by placing your cursor on the function name and pressing
C-c C-vNote the structure of the help:
the name, the package a short description a longer description the usage an explanation of the argument that can be passed to the function a detailed discussion of how the function and arguments are used values returned notes references and a set of examples.Copying and pasting the examples into a buffer and stepping through them can be a very valuable way to understand the function:
C-SPACE move cursor C-w C-x o C-y
help.start()Notice the structure of the help files for the specific packages. These are the same help texts that comes up in Emacs when you type
C-c C-v
Of these, the most useful to you for daily use will probably be the English or Chinese version of the Ref card by Tom Short.