Configure ATOM to use R in windows 10 - r

I am trying to set up Atom with R in Windows 10. I never used Atom before.
I am used to use Sublime Text, having a Sublime open in one window and sending code to the R GUI opened in another one.
I am trying to replicate this setup, and as far as possible, I do not want to have an R-studio like replica.
Is it possible?
Can anyone tell me how to make Atom and R interact?
So far I looked online and did not find much helpful information.
Thank you!

Related

Jupyter notebook spell checker with suggestions

I am running jupyter via anaconda in a web browser on windows. In nbextensions: I have tried,
calico-spell-check,
calico-spell-check,
spellchecker/main.
All highlight misspelled words fine but none suggest correct words.
Am I missing a set up step, my google fu is letting me down. Is there another extension that works as expected. I find it hard to believe that there is no true spell checker / corrector extension for a system designed around presenting of data, I must be missing a set up step or fundamental understanding of the system.
From what I've seen, such as this you just get highlighting in the classic Jupyter notebook interface. The limitations of what can be done with that interface is one of the reasons the current path forward for Jupyter development is JupyterLab and efforts based on similar underlying modern machinery, i.e., notebook version 7 is intended to look like the classic notebook interface while being based on the more modern components.
JupyterLab has spell check with suggestions available already added for editing markdown cells and editing markdown documents, see here. You can try it out in your browser now by going here and clicking launch binder to bring up a session where the extension is already installed and working.
For code, JupyterLab already has a nice autocomplete implementation that you'll get when you start typing a word and press tab to see suggestions. Additionally, some ideas have been offered for extending the current spell checking extension for JupyterLab to handle code cells, see tracking for this issue.

Alternative place to run my R code with more than 1GB RAM over RStudio Cloud

For some reason, my RStudio constantly crashes on start up in my windows laptop and I have an important assignment to be written in R soon. Are there any alternatives to RStudio that I can use to do this? My task takes over 1gb RAM which is just over the RStudio cloud limit hence I am unable to use that too.
I've gotten all the codes written down, just need to put them onto the Rstudio. If anyone wouldn't mind downloading the file, put my code down and send me a screenshot of the output, please let me know!
Thank you
Visual Studio Code
I second the comment that it probably is not Rstudio that causes the problem. But to answer your question:
Visual studio code has an extension for R, that would give you a quite similar experience.
At these links you can read more about the R extension and visual studio code
Edited to link to the most popular R-package.

How can I revert R Studio for Mac editor to default?

I just installed R Studio on my mac (was previously using on my virtual Windows machine). I am taking a class in which we learn to use R. The fix() function was demonstrated and when I ran it on my dataset it opened up an editor that was pretty ugly and done in X11 - that is, X11 launched automatically. The person next to me ran the same function but on her computer the pretty and I assume default R editor popped up. I have searched the internet and the options/preferences within R but cannot figure out how to both find out what the default would be if I did not have X11 installed AND change the editor in R Studio back to that program.
I can handle basic command line stuff if this is buried in a file I have to access through terminal/fancy preferences.
Has anyone run into this or have an idea of where to look? I don't want to use a text editor; just that nice-looking default program. Thanks!

Enter passwords interactively in R or R Studio (Server)?

Is there a way in R to enter passwords interactively to the command line and hide them from the screen? I know there's readLine, but I do not know passwords can be hidden there.
Assume you want to connect to a database using ROracle or RMySQL and do not want to store the password in a script but rather make the user enter it every time a query is executed.
Yes, we had a similar question around here, but I feel that the situation has changed and it's worth to address to problem again. Unfortunately tcltk won't work on RStudio (Server).
However I have seen the folks at R Studio found a solution for their version control support. I remember previous versions where I could see my repo password every time I enter it in R Studio, but now that seems to be fixed. I know it's likely R Studio technique, but is there a way mortal R users can access it when working with R Studio Server?
Actually R Studio (Server) provides a nice solution. You can access it by using .rs functions. They provide an undocumented password function which is really nice though there's no guaranteed support forever and a day:
.rs.askForPassword("foo")
You can find the the original hint from RStudio's Josh here:
http://support.rstudio.org/help/discussions/questions/1448-password-interaction-with-dbs-on-rstudio-server
EDIT:
As of 2015 there is another nice solution to enter password interactively. You could use shiny to have a little web based window with a password form. This discussion I had with #hadley shows an example snippet: https://github.com/rstats-db/RPostgres/issues/26
EDIT:
As of 2017 there is another update to this. #m-dz pointed us to this:
rstudioapi::askForPassword("Enter your pw") as well as getPass::getPass() from the R Studio Support webpage. Plus, I also realized that there is .rs.api.askForPassword() which is equivalent to the initially suggested call - at least as far as I've seen.

Tools Commonly used to Program in R

I apologize if this has already been asked a different way but I couldn't find anything getting at what I wanted.
I am really getting into R from other packages (SPSS). As I learn about what truly can be done, I realize that there are additional "tools" that I need. This gets me to my question.
What setup do you have for developing R code? I can't see myself actually developing r packages anywhere in the near future, but I do see myself wanting to manage my r projects effeciently, as well as create reports and presentations in LaTeX.
For context, I develop my R code in Eclipse for Windows, but I have had a real hard time successfully setting up Latex/Sweave and Github plugins.
Lastly, do you develop code using Windows or something else?
Many thanks in advance for any insight you can lend.
Emacs has everything I commonly need:
ESS (for R),
AucTeX (for Latex),
similarly rich 'modes' for other languages I use (C++, make, shell, ...),
plus a lot of other modes you get quite used to as e.g. dired for directory/file browsing or org-mode as planner/to-do list,
the SVN integration is very good too
and there are probably a number of tools within Emacs I am now forgetting.
Works in text mode as well as graphical mode, and works essentially the same (incl ESS and AucTeX) on several operating systems (Linux mostly and Windows when I must). On Debian/Ubuntu all this is prepackaged and tends to work out of the box as well. For both Windows and OS X, Vincent Goulet has package very handy bundles, see here.
The 'daemon mode' is outstanding too -- I keep the same main Emacs session running and just connect and re-connect to it even when accessing the machine (via ssh or directly) from different computers.
Also see the EmacsWiki for more tips around Emacs.
Back to Emacs and R in particular. The R FAQ says it pretty well:
6.1 Is there Emacs support for R?
6.2 Should I run R from within Emacs?
and I like the affirmative and resounding answer to the second question: "Yes, definitely". I fully concur.
I'll second the suggestion that Emacs compliments R nicely, but let me share what the "killer feature" is for me.
Using Org-mode with Org-babel, I can write whole reports with inline graphs produced from R in raster and vector format which compiles seamlessly into a PDF report via latex. I can also view the graphs while editing, similar to a WYSIWYG editor.
I just wrapped up a major report with over 70 inline graphs with little effort, no editing external files, no issues maintaining naming between figures in my report and external files, or forgetting to recompile the latest version of a figure. Org & Babel does it all.
Org-mode:
http://orgmode.org/
Org-Babel:
http://orgmode.org/worg/org-contrib/babel/index.php
Example of inline R with Babel and PDF output, see the first example in multiple formats:
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.php
Enjoy!
This is probably more relevant for package development, but it is also worth mentioning the roxygen R package that allows in-source documentation of your code. Note that even though you can't see yourself developing R packages anywhere in the near future, a package can be a very handy way of grouping related functions you develop and maintain, consistently documenting the code and keeping track of updates, even if you do not plan to distribute it.
I use a mac, and my most important tools are:
the command line, for running R
git, for keeping track of changes
github for publishing my code, bug tracking and collaboration
textmate for writing R code
Has anyone tried RStudio? It's the shiny new editor for R.
I use windows... (don't say it).
I like Notepad++ and NPPtoR. Makes it pretty easy to send things back and forth.
I use Eclipse on Windows and Linux. I compile LaTeX code (with Sweave) on Linux and I haven't bothered yet to set up the whole process in Eclipse. I need to pdflatex and bibtex files several times anyway, so I just have a terminal window with the specific string of commands handy. I tried ESS and Eclipse and they're very similar in functionality (and in my opinion the best two editors out there).
I use Eclipse / StatEt on Windows, and it Rocks !. For LaTex/Sweave I use MikTex which works well for me. For help setting things up check out this document and this post.
Other Tools you may find useful include;
If you want to build R Packages on
Windows, then get the RTools
For
Creating Documents, you may want to
check out odfWeave,
LibreOffice (was OpenOffice) and
the MSOffice ODF plugin
I have also
dabbled with Git but also didn't get
very far on Windows, but that was a
while ago.
For Presentations in LaTex
I recomend Beamer
I use Eclipse for both R and Latex while working on research papers. The plugins for both are very mature now. The nice thing is that you don't have to switch application while writing papers. I used different combination before but I found this to be the best.
I just got home from our local R User meeting (find one near you here) and of the 20 or so people there, all of us used a different program or tool to write R code in. I think that goes to show the diversity of the tools used to write and edit R code is just as diverse as the R community itself.

Resources