|
|
|
|
|
by JepZ
3114 days ago
|
|
A few weeks ago I had to do some data transformation (just a few thousand lines of data). Because I have some history with Excel I startet LibreOffice and wrote some formulas. After a few days I reached the point when LibreOffice required one and a half hours to recalculate the formulas. That was the moment when I asked a friend of my who has some R experience to help me with the basics (yes the syntax is kinda weird at the beginning). After 4 hours of learning by doing we had the same result as what I had reached in a few days of work with LibreOffice and it calculated everything in about 17 seconds. Yes, this time I knew exactly what I wanted and R can do much more efficient transformations than you could ever do with a spreadsheet calculator. Nevertheless I was quite happy with the result. As I am normally use to code with vim and tmux I use R just like a (bash)-script with the following shebang: #!/usr/bin/env Rscript
That way I can throw it into a watch myScript.R while I write it in vim in a different tmux pane. That might have some disadvantages compared to RStudio (e.g. can't view graphics in a terminal), but as it fits very nicely into my normal workflow and performs very well, I am very happy with that solution. |
|
I love it.
You can send a line to the R console using <space>. I've assigned loads of keyboard shortcuts beginning with your local leader that will do things like str(), levels(), head(), tail(), sum() on the object under the cursor.
It works fine with plotting figures, and I think you can set it up with tmux, though I use vim's buffers.
Haven't seen any disadvantages to compared to Rstudio yet. I guess you could even do :!git add ... from vim.
[1] https://github.com/jalvesaq/Nvim-R