禁用/抑制 R 中 CRAN 镜像选择的 tcltk 弹出窗口 [英] Disable/suppress tcltk popup for CRAN mirror selection in R

查看:23
本文介绍了禁用/抑制 R 中 CRAN 镜像选择的 tcltk 弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题与之前发布但从未在此处真正回答的问题类似:

My question is similar to a question previously posted but never really answered here:

在 R 中禁用 GUI、图形设备

我不喜欢 CRAN 镜像选择的 R tcltk 弹出窗口.当在两个包中搜索一个函数的帮助时,它们也会弹出来选择一个包.

I do not like the R tcltk popups for CRAN mirror selection. They also pop up to choose a package when searching for help on a function in two packages.

有什么方法可以在不完全禁用 X11 的情况下禁用这些窗口?我仍然希望 plot() 命令正常工作,但禁用通过远程连接永远加载的小选择菜单.

Is there any way to disable these windows without disabling X11 completely? I still want plot() commands to work as normal, but disable the little select menus that take forever to load over a remote connection.

例如,如果你使用 ssh,但不使用 -X,那么镜像选择只是 R 中的文本,你输入一个数字.它很快.这就是我想要的,但要为地块保持 X11.

For example, if you use ssh, but don't use -X, then the mirror select is just text within R, you type a number. It's fast. This is what I want, but maintaining X11 for plots b.

有人知道如何维护图形窗口但禁用选择"tcltk 窗口吗?

Anyone know how to maintain graphics windows but disable the "choice" tcltk windows?

推荐答案

Dirk 提供了完全避免使用菜单的方法,但要回答你提出的问题,我想你想要

Dirk provides ways to avoid the menus altogether, but to answer your question as posed, I think you want

options(menu.graphics=FALSE)

我通过查找从 help 返回的对象类(它是 help_files_with_topic)、扫描 utils:::print.help_files_with_topic 并找到线

I tracked this option down by finding the class of objects returned from help (it's help_files_with_topic), scanning utils:::print.help_files_with_topic and finding the line

menu(txt, title = gettext("Choose one"), graphics = getOption("menu.graphics"))

这篇关于禁用/抑制 R 中 CRAN 镜像选择的 tcltk 弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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