24.01.2013 Views

handout - Daina Chiba

handout - Daina Chiba

handout - Daina Chiba

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3 R<br />

3.1 Text Editor<br />

Why you want to use a text editor?<br />

• Syntax highlighting<br />

• Parenthesis matching<br />

• Let you send part or all of the R codes to R<br />

A powerful text editor significantly reduces careless mistakes and save your day.<br />

3.1.1 How to Install Tinn-R (PC users)<br />

If you want to install Tinn-R to a Rice computer (for which you don’t have an Administrator<br />

privilege):<br />

1. Go to the Tinn-R website and download the last runnable version without installer<br />

(1.15.1.7) (.zip, 2.9 Mb) at the bottom of the page. (Alternatively, you can click here<br />

to download it.)<br />

2. Unzip the downloaded zip file.<br />

3. Copy the Tinn-R folder to “System (C:) Program Files”<br />

4. Under Program Files/Tinn-R/bin, there is the executable file named “Tinn-R.exe”.<br />

Create a shortcut to this file and place it to some convenient location (e.g., Desktop).<br />

3.1.2 How to Use Tinn-R (PC users)<br />

1. Open R<br />

2. Open Tinn-R, open the accompanying R code (2_RPart.R) from Tinn-R.<br />

3. Arrange the two windows side by side, so that you can see both windows simultaneously<br />

(See the top figure on the next page.)<br />

4. Assign “Hot keys.”<br />

(a) Click R menu of Tinn-R’s, and choose “Hotkeys of R”<br />

(b) A small window will appear (See the bottom figure on the next page).<br />

(c) Choose “Send selection” from the left menu, and then click on “Active” on the<br />

bottom.<br />

(d) Assign a shortcut key of your choosing. I chose “Ctrl + j”<br />

(e) Click “Add”<br />

10

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!