140 likes | 164 Views
Learn how to assign variables in R, calculate molecular weights, and submit your R script file. Follow the steps and tips for efficient coding.
E N D
File/Save As Give the file a name (with the extension .R) and a location. Click Save
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.
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
You can also run a selection by highlighting it and clicking Run or Ctrl+Enter
Once the (atomic weight) variables have been assigned values, we can use them to calculate (molecular weights)
You can assign the result of a calculation (on the right) to a variable (on the left)
To do • Use your R script to calculate the molecular weight of • Fructose C6H12O6 • Sucrose C12H22O11 • Lysine C6H14N2O2 • Submit your R script file