1.3) Type with care!
C. R is always case-sensitive. Most R commands must be in lower case. So capital letters can be useful for distinguishing objects that you create – like X and Y in the script above.
Beware that inverted commas sometimes get reformatted when copying and pasting. Check that you have simple ones ("") and not the directed ones from word-processing software (“”) in your R script. You can use single inverted commas (' ') instead if you like – again, they must be simple and not directed.
In the GUI window, you can also use the up and down arrows to scroll through commands you’ve previously typed.