如何将所有options()参数重置为其默认值? [英] How do I reset all options() arguments to their default values?

查看:249
本文介绍了如何将所有options()参数重置为其默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如标题中所述,我试图了解如何将options()中的所有参数重置为其默认设置.我在网上搜索了?options帮助文件,但找不到答案.

As noted in the title, I'm trying to understand how to reset all arguments in options() to their default settings. I searched online and in the ?options help file and am failing to locate an answer.

我希望答案容易得到,而我只是在努力寻找答案.

I expect the answer is readily available, and I'm simply struggling to find it.

谢谢.

我同意如何设置R是否为默认选项?是同一个问题,我无法在其选择的答案中看到我要求的清晰/明确的解决方案:如何重置 options()为其默认值.在该线程中选择的答案清楚地说明了如何保存 options()设置并稍后加载.

While I agree How to set R to default options? is the same question, I'm failing to see in its selected answer the clear/explicit solution I requested: how to reset options() to its defaults. The selected answer in that thread clearly explains how to save options() settings and load them later.

推荐答案

如果重新启动R会话,它将把选项重置为默认值. 选项保存在列表中,调用options()将显示该列表.

If you restart your R session, it will reset the options to the default values. Options are saved in a list, and calling options() will show that list.

重新启动R后,您可以保存默认选项:

You can save the default options after restarting R:

backup_options <- options()

您可以进行所需的任何更改,然后恢复为默认选项:

You can make any changes you need, and then to revert to the default options:

options(backup_options)

这篇关于如何将所有options()参数重置为其默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆