r - 无法从 Linux 终端看到 R 帮助文件

标签 r linux

大部分时间我通过远程服务器上的终端处理项目。最近我升级了我的 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/

相关文章:

r - 中断/退出脚本

r - 有没有更好的方法来检查列表中的所有元素是否都已命名?

java - 如何识别特定的 USB 端口

linux - 具有少量父设备属性的 udev 规则

c++ - Linux 和 Windows c++ 上的低级文件操作处理

c++ - 用于 BLE 的 BluezV5.42 DBUS C API?

r - 错误 : configuration failed for package ‘gifski’

python - cmap 在seaborn 中如何工作以及如何更改分箱?

r - 粗体绘图 (R) 饼图标签

linux - 如何在 block 内写入确切的字符串而不是执行它们?在 Bash 中使用 << EOF 时?