1 / 14

A little Introduction to R

A little Introduction to R. Start/All Programs/Rstudio/RStudio. File/New File/R Script. File/Save As. Give the file a name (with the extension .R) and a location. Click Save. Start with some R comments (lines that begin with #). Assigning variables.

Download Presentation

A little Introduction to R

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A little Introduction to R

  2. Start/All Programs/Rstudio/RStudio

  3. File/New File/R Script

  4. File/Save As Give the file a name (with the extension .R) and a location. Click Save

  5. Start with some R comments (lines that begin with #).

  6. Assigning variables. • The variables are not really assigned yet because the code has not been executed. The result of executing code from our R script will appear in the console. But first we will clear out the console.

  7. Edit/Clear Console or keyboard shortcut Ctrl+L

  8. You can run a line from your script by putting the cursor next to it and clicking the Run button or using Ctrl+Enter. See result in Console

  9. You can also run a selection by highlighting it and clicking Run or Ctrl+Enter

  10. Other variations on Run

  11. Note the values also show up in the Environment panel

  12. Once the (atomic weight) variables have been assigned values, we can use them to calculate (molecular weights)

  13. You can assign the result of a calculation (on the right) to a variable (on the left)

  14. To do • Use your R script to calculate the molecular weight of • Fructose C6H12O6 • Sucrose C12H22O11 • Lysine C6H14N2O2 • Submit your R script file

More Related