Giter VIP home page Giter VIP logo

Comments (10)

jalvesaq avatar jalvesaq commented on July 22, 2024

I installed R 3.0 on Windows 7, installed the Vim-R-plugin, started editing a test.R file, pressed the R button and R 3.0.0 started as expected. So, I guess that you have tried to setup the R path in your vimrc. Have you set the value of vimrplugin_r_path?

from vim-r-plugin.

tonyctan avatar tonyctan commented on July 22, 2024

First of all, a big thank you! Do you mean including the following in vimrc, as suggested in section 6.7 of the help file? Yes, I tried after your first reply (this may be a stupid question but should it be "", "", "/" or "//", what's the difference), but the error message did not go away. I did not include this line when I was using R 2.15.2 and all buttons worked fine. Things only started to go wrong after upgrading. I am sure it is only a matter of re-link things but I am not sure where to start. Thanks again.

let vimrplugin_r_path = "C:\Program Files\R\R-3.0.0\bin\i386"

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

It should not be necessary to do anything. In my test, the plugin was able to find R 3.0.0 on Windows 7 without any configuration. Could you please reinstall the plugin and try it without the ~/_vimrc file or with only the minimum vimrc suggested in the plugin's installation instructions? If it works, then, the problem is in your vimrc. The vimrplugin_r_path should be used only by people who have more than one version of R installed and want to use a version older than the last one. What version of Windows are you using?

from vim-r-plugin.

tonyctan avatar tonyctan commented on July 22, 2024

Great news! I finally managed to get everything working again. Thank you once again for helping me and it is my privilege to get in contact with the architect of the vim-r-plugin--I cannot thank you enough for this marvellous project.

After lots of trial & errors, I ruled out my vimrc as the source of the problem because it merely specified the background colour and displaying line numbers. (To answer your last question: I use Windows 7 Ultimate.) My solution is quick and dirty: since the problem appeared to rest at rpath and this parameter is defined in line 168, I changed it from

rpath = vim.eval("g:rplugin_Rgui")

to

rpath = "C:\Program Files\R\R-3.0.0\bin\i386\Rgui.exe"

I am sure this is not what the designer intended and I may well expose myself to unknown troubles. In addition, I will have to keep changing this line when I update R each time. Are there any better suggestions?

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

Instead of editing line 168 of r-plugin/windows.py could you please add the following as line 169:

rpath = rpath.replace("\\", "\\\\")

Note that the line above should be indented by 4 empty spaces, as is line 168. Please, let me know if this solves the bug...

from vim-r-plugin.

tonyctan avatar tonyctan commented on July 22, 2024

Yes, yes! It worked! Thanks! So what happened before?

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

I didn't read carefully enough the error message that you reported. Searching about "OSError: [Errno 22] Invalid argument" I discovered that Python was interpreting the backslash as indicating that the following character was a special character (like a new line, a tabular character etc). Thanks for reporting the bug.

from vim-r-plugin.

tonyctan avatar tonyctan commented on July 22, 2024

Thank YOU for everything.

from vim-r-plugin.

tonyctan avatar tonyctan commented on July 22, 2024

I finally worked out the source of the error: it was actually not in the windows.py file at all, but in my R setting. Users will experience such error message if they have allowed R to be run with administrator privilege as default (ie, in Windows 7 by right-clicking R, "Property", "Compativility" tab, under "Privilege level" tick "Run this program as an administrator") There is no need to update the Python file, a warning on the website should suffice. Thanks once again.

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

Thanks for the additional information. This may explain why I didn't see the bug right after you reported it. I've already released a new version of Vim-R-plugin with the additional line 169. Moreover, the plugin should work with R running as both administrator and common user. Since I don't use Windows, I'll wait until someone reports that something is broken on Windows.

from vim-r-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.