Is there any command to exit R programming?

Is there any command that can be used to exit Rstudio by the console?(Similar to exit or quit in MATLAB)

1

2 Answers

Yes. You can exit R with the quit() command. More succinctly, the quit command is aliased as q().

Normally when you start R, you'll be reminded of this command. For example, in my install I see:

R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

See docs here.

0

Yes ,You have to use quit()

> quit()
Save workspace image? [y/n/c]: 
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like