R function sent from np++ to R console does not work
-
I am trying to use a function that is available at Clear R Console programmatically to clear R console programmatically. The program is:
cls <- function()
{
system(“powershell (New-Object -ComObject Wscript.Shell).SendKeys([string][char]12)”);
}
I have included the program in the Rprofile.site file. The function runs fine in the R console window. But if I send the function from Notepad++, it does not work. Will any one figure out the problem. -
How did you “send” the function from Notepad++ ?
-
It was sent as cls() using hot keys for pass line F8. Please note that other functions I have written for data analysis, functions present in the R packages run perfectly OK when sent from np++ via pass line key F8.
-
To my knowledge there is no automated way to pass function from Notepad++ to the R console other than copy paste or opening the file directly in R.
Maybe you are using a plugin or something else to integrate Npp with R? otherwise remember Npp is just a text editor and can’t integrate directly with R or with any other language or IDE without the use of plugins or else.
F8 in the default install of Npp does not pass any line to anything else.
-
I am using NppToR add on package to Notepadd++ that adds syntax highlighting for the R Language, as well as code passing between Notepadd++ and R.
-
You should also post a bug in the plugin site: https://github.com/halpo/NppToR/issues or https://sourceforge.net/p/npptor/bugs/
Actually there’s a similar bug posted in there which might be of help to you: https://github.com/halpo/NppToR/issues/8
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login