Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvarobrey/formatfileaddin
RStudio addin for formatting R source code with formatR
https://github.com/alvarobrey/formatfileaddin
r rstudio rstudio-addin rstudio-addins
Last synced: 16 days ago
JSON representation
RStudio addin for formatting R source code with formatR
- Host: GitHub
- URL: https://github.com/alvarobrey/formatfileaddin
- Owner: AlvaroBrey
- License: mit
- Created: 2017-11-02T21:15:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-28T22:41:17.000Z (over 6 years ago)
- Last Synced: 2024-04-25T02:34:31.183Z (7 months ago)
- Topics: r, rstudio, rstudio-addin, rstudio-addins
- Language: R
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# formatFileAddin
This is an addin for RStudio that allows formatting the currently selected R file with only a keyboard shortcut.
No need to do `Ctrl+A, Ctrl+Shift+A` anymore!Also, this uses [formatR](https://github.com/yihui/formatR) which is a superior formatter to the RStudio built-in.
## Installation
First install formatR and devtools:
```R
> install.packages(c("devtools", "formatR"))
```And then install this package:
```R
> devtools::install_github("ontherunvaro/formatFileAddin")
```## Usage
You can:
* Bind it to a keyboard shortcut (`Tools > Addins > Keyboard Shortcuts`), or
* Use it directly from the `Addins` dropdown toolbarYou can either select a code chunk beforehand to format only that chunk, or select nothing in order to have the whole file formatted.