Commands in R can be entered directly into the console, but they can also be run line by line from the editor. To run a line of code from the editor, you can move the cursor to that line, and press Ctrl + Enter on your keyboard.
Try entering 1+1 in your R script and pressing Ctrl + Enter, with the cursor on that line. The following should be printed in the console: