After my Linux Mint updated R from 3.3 to 3.4, Nvim-R had an issue. The problem was that nvimcom was not loaded. I solved this problem while writing this text describing the issue. I will post the text anyway so that it might help others.
---
R tells me
During startup - Warning messages:
1: In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘nvimcom’
2: package ‘nvimcom’ in options("defaultPackages") was not found
I can send individual lines of code to the console and also selected lines and functions etc. but sourcing the whole file fails:
> nvimcom:::source.and.clean("/home/daan/research/trend/R/trend.R.tmp.R", print.eval=TRUE)
Error in loadNamespace(name) : there is no package called ‘nvimcom’
Also, when I do ,rh on a function R says "ClientServer not running."
With every update of R I have to reinstall the packages which are installed in directories like ~/R/x86_64-pc-linux-gnu-library/3.4. I would install nvimcom manually but at
https://github.com/jalvesaq/nvimcom it says you shouldn't and that it will be installed or updated whenever necessary. It seems this is not the case on my system. I did a VundleUpdate which updated Nvim-R as is in the log:
[2017-04-23 18:12:30] Plugin jalvesaq/Nvim-R [2017-04-23 18:12:30] $ cd '/home/daan/.vim/bundle/Nvim-R' && git pull && git submodule update --init --recursive [2017-04-23 18:12:30] > 46cfbe9..d11e76a master -> origin/master [2017-04-23 18:12:30] > * [new tag] v0.9.9 -> v0.9.9 [2017-04-23 18:12:30] > Updating 46cfbe9..d11e76a [2017-04-23 18:12:30] > Fast-forward +++++++++++++++++------- [2017-04-23 18:12:30] > R/extern_term.vim | 11 +- [2017-04-23 18:12:30] > R/nvimcom/R/nvimcom.R | 1 + [2017-04-23 18:12:30] > R/nvimcom/src/nvimcom.c | 40 ++++-- [2017-04-23 18:12:30] > R/tmux_split.vim | 5 +- [2017-04-23 18:12:30] > R/windows.vim | 66 +++++---- [2017-04-23 18:12:30] > doc/Nvim-R.txt | 281 ++++++++++++++++++++++++++----------- [2017-04-23 18:12:30] > ftdetect/r.vim | 1 + [2017-04-23 18:12:30] > 14 files changed, 429 insertions(+), 186 deletions(-)
---
I solved the problem by copying nvimcom from the old R packages folder to the new one:
cp -r ~/R/x86_64-pc-linux-gnu-library/3.3/nvimcom/ ~/R/x86_64-pc-linux-gnu-library/3.4/nvimcom