• Login
Community
  • Login

R function sent from np++ to R console does not work

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
6 Posts 3 Posters 3.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C
    Chandrasekhar Rudrappa
    last edited by Oct 5, 2017, 3:00 AM

    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.

    1 Reply Last reply Reply Quote 0
    • G
      Gogo Neatza
      last edited by Oct 7, 2017, 10:54 AM

      How did you “send” the function from Notepad++ ?

      1 Reply Last reply Reply Quote 0
      • C
        Chandrasekhar Rudrappa
        last edited by Oct 9, 2017, 12:18 PM

        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.

        1 Reply Last reply Reply Quote 0
        • F
          Frank Orellana
          last edited by Oct 9, 2017, 4:07 PM

          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.

          1 Reply Last reply Reply Quote 0
          • C
            Chandrasekhar Rudrappa
            last edited by Oct 10, 2017, 5:58 AM

            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.

            1 Reply Last reply Reply Quote 0
            • F
              Frank Orellana
              last edited by Oct 11, 2017, 3:50 PM

              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

              1 Reply Last reply Reply Quote 0
              3 out of 6
              • First post
                3/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors