Some simple RStudio addins

[This article was first published on Saturn Elephant, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
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.

To leave a comment for the author, please follow the link and comment on their blog: Saturn Elephant.

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.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)