大部分时间我通过远程服务器上的终端处理项目。最近我升级了我的 Linux (Debian jessie) 平台,然后我看不到 R 帮助文件:
$ssh -X abcd
$R
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 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.
> ?table
sh: vimrpager: command not found
>
有没有人知道原因并有一些修复建议?顺便说一下,我在 .Rprofile 上有这些设置:
# See R documentation on Vim buffer even if asking for help in R Console:
if(Sys.getenv("VIM_PANE") != "")
options(help_type = "text", pager = vim.pager)
}
}
options(help_type = "text",
"width"=200)
#clean workspace everytime when quit R
.last<-function() rm(list=ls())
最佳答案
我们通过 /etc/R/Renviron
中的这些设置来查看我们使用的内容是“通用的”:
## Default browser
R_BROWSER=${R_BROWSER-'xdg-open'}
## Default editor
EDITOR=${EDITOR-${VISUAL-vi}}
## Default pager
PAGER=${PAGER-'/usr/bin/pager'}
## Default PDF viewer
R_PDFVIEWER=${R_PDFVIEWER-'/usr/bin/xdg-open'}
由于此处可能使用了 PAGER
,因此您已经检查了为什么您当前的 /usr/bin/pager
设置,这很可能符号链接(symbolic link)失败并解决它。 apt-cache search pager
显示了很多备选方案(因为有很多误报)。
关于r - 无法从 Linux 终端看到 R 帮助文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38660385/