Instructions for Using R
When you first open R it should look like this:
Commands can be entered at the prompt in the console window. For example,

One handy thing is that if you want to redo a command you can hit the up arrow at the command prompt and it will redisplay the last command. Hit the up arrow multiple times goes back multiple commands. So suppose I notice I made a typo and the 23 should be a 25, I hit the up arrow twice to go back two commands and change the 23 to a 25. Hit enter and then hit the up arrow twice to find the mean again.

Or you can put the commands in a script file. The advantage of this is that you
can save the commands and modify them as needed. The default folder to save
scripts is the R folder on the C: drive, so if you're in the lab save it to your
H: drive. To open a script file click on File
and New Script.

This will open another window which is a text editor. You can then enter commands in this window.

So for example type the following two lines in the text editor window as below (the comment lines are optional).
x=rnorm(100,25,3)
hist(x)
To run these commands, highlight them and then right click on
Run Line or Selection
as below.
(Control-R will also do the same thing.)

After you run the commands another window with the histogram will popup.
If you want help or more information about any command at the command prompt you can type, for example. This will pop up help windows.
> help(rnorm)
or
> help(hist)