I prepared this for the readme but I think I need something more convenient, + tabs become spaces when knitting so copy and paste won't work right.
I think CRAN policies forbid writing out of the project directory, but we could have a function set_nakedpipe_snippets() which will put what's needed into the pastebin, open the file using file.edit(), and give instructions about what to do in the console.
Useful snippets
You can use RStudio's snippets to save some typing. Follow the instructions below and you'll be able to type :
cars . # + 2 time the <tab> key
and display :
cars %.% {
# with the cursor conveniently placed here
}
(or type .. to get the %..% equivalent)
To do this, run the command below to open the file in your script tab :
file.edit("~/.R/snippets/r.snippets")
Then paste the following anywhere (at the top is ok), and in this order :
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
I prepared this for the readme but I think I need something more convenient, + tabs become spaces when knitting so copy and paste won't work right.
I think CRAN policies forbid writing out of the project directory, but we could have a function
set_nakedpipe_snippets()
which will put what's needed into the pastebin, open the file usingfile.edit()
, and give instructions about what to do in the console.Useful snippets
You can use RStudio's snippets to save some typing. Follow the instructions below and you'll be able to type :
and display :
(or type
..
to get the%..%
equivalent)To do this, run the command below to open the file in your script tab :
Then paste the following anywhere (at the top is ok), and in this order :