David Z David Z - 1 year ago 94
Linux Question

Can not see the R help file from Linux terminal

Most of time I work on projects through terminal on remote servers. Recently I upgraded my Linux (Debian jessie) platform, and I am unable to see the R help files then:

$ssh -X abcd
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

Does anybody know the reasons and have some suggestions to fix it? By the way, I have these settings on .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",
#clean workspace everytime when quit R
.last<-function() rm(list=ls())

Answer Source

We are being "generic" in what we use for viewing via these settings in /etc/R/Renviron:

## Default browser       
## Default editor                     
## Default pager   
## Default PDF viewer   

As PAGER is likely used here, you have check why your current setting of the /usr/bin/pager, which is likely a symlink, is failing and address it. apt-cache search pager shows a number of alternatives (as of lots of false positives).

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download