有退出R编程的命令吗?

Is there any command to exit R programming?

有没有控制台退出Rstudio的命令?(类似于MATLAB中的exitquit

是的。您可以使用 quit() 命令退出 R。更简洁地说,退出命令的别名是 q().

通常当您启动 R 时,系统会提醒您这个命令。例如,在我的安装中,我看到:

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.

docs here

是的,你必须使用 quit()

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