Some simple RStudio addins
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
In this blog post I introduce three small RStudio addins I did.
‘bracketify’
I prefer subsetting with the double brackets than with the dollar in R,
because this is more readable in RStudio thanks to the
syntax highlighting. That’s why I did
bracketify. This addin
replaces all occurrences of foo$bar
with
foo[["bar"]]
, either in a whole file or only in the current
selection.
To use carefully: if you have some dollar symbols in your code which are not used for subsetting (e.g. in a regular expression), they can be transformed by bracketify.
‘pasteAsComment’
Originally, I made pasteAsComment to paste the content of the clipboard as a comment:
I updated this package today. Now it also allows to paste the content of
the clipboard as roxygen lines. This is particularly
useful to write some code in the @examples
field:
‘JSconsole’
JSconsole is available on CRAN. This addin allows to send some selected JavaScript code to the V8 console. This is useful when you want to test a function.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.