Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    6 Posts 3 Posters 3.4k Views 1 Watching
    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.
    • Chandrasekhar RudrappaC Offline
      Chandrasekhar Rudrappa
      last edited by

      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
      • Gogo NeatzaG Offline
        Gogo Neatza
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • Chandrasekhar RudrappaC Offline
          Chandrasekhar Rudrappa
          last edited by

          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
          • Frank OrellanaF Offline
            Frank Orellana
            last edited by

            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
            • Chandrasekhar RudrappaC Offline
              Chandrasekhar Rudrappa
              last edited by

              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
              • Frank OrellanaF Offline
                Frank Orellana
                last edited by

                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

                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
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors