To quit R, you can use either the function
or its identical shortcut,
, which do not require any arguments. Alternatively, if your version of R has a menu bar, you can select "quit" or "exit" with the mouse.
Either way, you will be asked if you want to save the workspace image. This will save all the work you have done so far, and load it up when you next start R. Although this sounds like a good idea, if you answer "yes", you will soon find yourself loading up lots of irrelevant past analyses every time you start R. So answer "no" if you want to quit cleanly.