Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R Support #118

Closed
danielecook opened this issue May 9, 2014 · 6 comments
Closed

R Support #118

danielecook opened this issue May 9, 2014 · 6 comments

Comments

@danielecook
Copy link

Has anyone looked into adding R Support? Not sure how feasible it would be. Here is what I came up with:

R:
"Selection Based":
command: "RScript"
args: (code) -> ['--vanilla -e', code]
"File Based":
command: "RScript"
args: (filename) -> [filename]

I guess the problem is when working with R, you generally want to be able to keep an open connection, and RScript will close it when the command or file is done executing. A better alternative would probably be do open an R session, and pipe commands in. Not sure how to go about doing that, or if it is possible under atom-script.

@rgbkrk
Copy link
Member

rgbkrk commented May 9, 2014

@cogiforest added filed based runs for R in #114. I haven't pushed a release yet, but I can do that today.

Does the selection based run with --vanilla work with multiple lines?

@rgbkrk
Copy link
Member

rgbkrk commented May 9, 2014

As for keeping a connection open, we don't have any amount of REPL handling. Everything is a one-shot.

I really need to re-think how to handle this, as I see Atom as being a great IDE playground where your plots can appear right in your editor (similar to RStudio, IPython notebook).

@rgbkrk
Copy link
Member

rgbkrk commented May 9, 2014

If I use the selection based run suggested, all of my lines end up being ignored:

ARGUMENT '<beautiful R code here>' __ignored__

@danielecook
Copy link
Author

What version of R are you using? That may be why.

Given that Atom can handle images, markdown, and other types of dynamic content there are probably some really cool things that can be done with regard to R integration. I'm not sure if it's something that should be pursued here.

@rgbkrk
Copy link
Member

rgbkrk commented May 9, 2014

14:18:35 ~$ R --version
R version 3.1.0 (2014-04-10) -- "Spring Dance"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin12.5.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

14:18:36 ~$ Rscript --version
R scripting front-end version 3.1.0 (2014-04-10)

@rgbkrk
Copy link
Member

rgbkrk commented May 12, 2014

Finally pushed a release with R support but it only works for file based runs. Feel free to submit a PR to get selection mode working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants