Instructions for Getting R
Go to https://cran.r-project.org/
First:
- Select
your preferred download platform for your operating system (Linux, macOS,
Windows) and follow the link.
For Windows
- Click base
- Click
on the Download R 4.4.1 for Windows
link (or the latest version)
- This
downloads a .exe file which you should be able to double click (you need
to have write access on your computer)
- Click
the .exe file (you may have to give permission)
- Select
the language you want and press OK to start the Setup Wizard
- You
should be able to accept all the default settings in the setup program
(keep pressing Next) OR you might prefer selecting “customized startup”
when it asks and then just changing the MDI option to SDI (and accepting
all other defaults)
- By
default, the software will be placed in C:\ProgramFiles\R\R-4.2.1
For MacOS X
- Scroll
down and click a link for R-4.4.1.pkg if you have Mac OS X 11 (Big Sur) or
higher, otherwise you can use another version
- Double
click on the resulting R icon to install the program.
Instructions for Getting RStudio
In addition you may want to download R Studio. Follow the
download button here:
http://rstudio.org/download/
(will send to posit.com/products/open-source/rstudio)
You want the RStudio Desktop version (Open
Source Edition). Press the Download RStudio Desktop button. Then
select the Installer.
For R Markdown
Within RStudio, in the lower right window select
Packages. If knitr is listed there, check it.
If not, check Install Packages, type in knitr in the
Packages line and press Install. Now you can select it. Now you can select File
> New > R Markdown to create an R Markdown document or File > Open to
open an existing .Rmd file.
Example: To load data and the workspace:
```{r}
OldFaithful <-
read.delim("http://www.rossmanchance.com/iscam2/data/OldFaithful.txt")
View(OldFaithful)
attach(OldFaithful)
load(url("http://www.rossmanchance.com/iscam3/ISCAM.RData"))
```
Instructions for Loading ISCAM Workspace in R
1. Make sure R is downloaded to
your computer
2. Go to this webpage: http://www.rossmanchance.com/iscam4/files.html
- On
many computers, you will be able to click the ISCAM R Workspace
link and it will download the .RData file and
launch R. On other computers, you may need to select R from a list of
programs (if it doesn’t automatically recognize the .RData
extension).
- If this works, you are encouraged to always follow these
steps to launch R.
- If
this doesn’t work (especially Mac users), then you have the option of
saving the .RData file to your computer. If this
option isn’t obvious you can right-click on the link (PC) or use alt-click
(Mac) to be able to save the file. For R to recognize this file, it must
have the .RData extension. If your file does
not have this extension, change the file name. Then in R, you can select File
> Load Workspace and direct R to this file. (You can also use the pull-down
menu to select “all file types” if R is not seeing this file.)
Saving Graphs
You should be able to click on the
graph and copy (e.g., ctrl-C on PC which places it on the clipboard, or a
snipping tool) and then paste (e.g., ctrl-V) into a word processing file. (See
also the options under the Export tab.) It’s easiest if the format of these
pictures in Word is “in line with text.”