Bug in R-pluging
Answered
I have 2 concerns,
1. Sometimes when I try to plot I get the following error. How can I solve it?
Evaluation error: unable to start png() device.
2. Ctrl + Enter doesn't run the current line of R code if it has a commend at the end. For example,
rnorm(100) # test
rnorm(100)
Ctrl + Enter works for the first line of code, but not for the 2nd line.
Please sign in to leave a comment.
Hi Quazi, which R plugin version do you use? It was completely rewritten recently, the new version is available starting with 2019.3 EAP.
I am R plugin version 193.5233.257
I've been able to narrow down the bug,
library("survival") # testIf I place my cursor anywhere on
library("survival"Ctrl+Enter executes the line. But if it's at the last parenthesis or anywhere afterwards, ctrl+enter doesn't work.
Thanks, reproduced as well. I created a ticket in the RPlugin issue tracker https://youtrack.jetbrains.com/issue/R-400 Please feel free to follow/comment it.
Thank you!
The bug is solved. Now there is a weird behavior. If I press ctrl+enter then it executes the R code following the comment and white space. I do not think this is intended.
Here in an example,
# comment
<white line>
<white line>
x < rand(100)
If I press ctrl+enter when the cursor is anywhere on the comment line, the `x <- rand(100)' line is executed. Probably the expected behavior is to echo the comment in R console. It is the default behavior with RGui that comes with R.
Also if there is no R code following the comment then nothing happens. The cursor does move when I press ctrl+enter. Be the cursor is at the beginning, middle or end of the comment. This is very inorganic behavior. The cursor should at-least move to the next line showing there is nothing to do.
@ Quazi Irfan
I would argue this is expected behavior. I'm testing the latest build, and following your example - when you press ctrl+enter on the comment line, PyCharm finds the next line with the actual statement (skipping comments and blank lines), and executes it. The same behavior is seen it RStudio.
You are half right. For the other half nothing happens I when you press ctrl+enter on a comment line that doesn't follow some R code. But RStudio echos the comment line.
Can you please provide example when echoing the comment from the editor to the console can be useful? RStudio also handles it in a weird way, echoing only comments from lines above the caret unless they are separated by blank lines.
Consistency among editors.
Sometimes I walk through an entire program just by pressing ctrl+enter. Both R Editor(comes with R Gui) and RStudio has this behavior.
Hi I'm using PyCharm 2020.1 with a proffesional license. Initially I was able to write and run R code using R-3.6.3 and the Rplugin. However one day after restarting Pycharm I found that there was no interpreter installed for the same project. I Uninstalled and then Re-Installed R-3.6.3 but after reinstallation when setting the interpreter to '~/R/bin/R.exe' I got the error
Helper 'GetVersion.R' has non-zero exit code: 1
Stdout: >>>RPLUGIN>>>R version 3.6.3<<<RPLUGIN<<<
Stderr: The system cannot find the path specified.
The system cannot find the path specified.
The heading for the error box says Invalid R interpreter only version 3.3 + supported. I get the same error with R-3.3.3. I have also tried ~R/bin/x64/Rgui.exe
Please help!
@Research
Are you using the latest PyCharm and R Plugin versions?
Are you able to run R shell from the terminal? Is it successful?
If you answered "Yes" to both questions, please submit a bug report to https://youtrack.jetbrains.com/issues?q=%23%7BR%20Plugin%7D