GithubHelp home page GithubHelp logo

r-box's People

Contributors

fangly avatar randy3k avatar rsaporta avatar vqv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

r-box's Issues

send selection to terminal and R console

As far as I can tell R-Box either sends code to the R console OR Terminal OR iTerm. Is it possible to assign three different key bindings to those three options (in order to be able to switch between them)?

Ctl + enter in Linux does not recognize $, which is used in list object

In Linux when using screen.

When you have a list say "lobj" that has names, say "o1" and "o2", then in R one can call lobj$o1 to see o1.
However, when executing lobj$o1 in sublime using ctl+enter, only lobj is executed. One has to add a backlash as lobj$o1 to execute it.

This would be a quick fix :). Thanks

Cannot send large text chunk to R

Hi. When I try to send a very large chunk of code to R (a few hundred lines), nothing happens. The R-box will only work if the chunk is relatively small (I guess up to about a hundred lines). Is there a limit to the buffer size, and could this be increased? Thanks

Support for RStudio?

For Enhanced-R there was "experimental" compatibility with RStudio; is this the case with R-Box? Because I have been having some issues, other than the one you mentioned in the cited issue report about having to lift immediately after sending code to RStudio with +enter. Namely, when sending code for the first time after opening a new session in RStudio, what is sent appears to be whatever is on the system's clipboard rather than the intended line of code in Sublime; i.e.:

  • I open a new session in RStudio, by closing and re-opening the program, by manually clearing the workspace with

    rm(list=ls(all=TRUE)

    or by manually restarting the session within RStudio from the Session menu or with ++F10;

  • I use +enter to send R code from Sublime (I'm using ST3 [on a Mac]) to RStudio, which I've arranged by adding the following to the user R-Box.sublime-settings:

    {
      "App": "RStudio"
    }
  • and what is sent to RStudio is the contents of my system's clipboard, not the specified line of R code.

N.B.:

  • This happens to me both with a quicker and a slower release of .

  • I could not reproduce the issue with standard R. I tried quicker and slower releases of , clearing the user R-Box settings file entirely and, also, specifying "R" as "App" in the R-Box settings:

    {
      "App": "R"
    }

set working directory automatically

When I use SublimeREPL: R ("driven" by R-BOX of course), I manage to tell it to use the current folder as home folder. It saves a lot of confusion. The setting is "cwd": "$folder",.

Sadly I haven't found how to do the same in RBox when using the R app (I'm using OS X).

Is it possible, and if yes, how?

dollar sign issue in roxygen for R-extended syntax

When I put a dollar sign in a code example in roxygen using R-extended syntax it fouls up the syntax highlighting of the rest of the document. I can escape the dollar sign but then my package check fails. I'd take a crack at fixing it if I understood tmLanguage files.

ConEmu Configuration

ConEmu is built on cmder foundations I think. It would be nice if there was a send to ConEmu option on windows.

Revolution R Open does not work with R-Box

I have installed RRO on a new macbook pro 13" retina (two cores) & Yosemite.

I tried with RSTUDIO and R 25 (S. Urbinek notorious benchmark) and I got the test time down from ~31 s to a blazing 5 s (thanks to multithreading and Intel MKL). Marvellous!

The problems are with Sublime text. I use Sublime text 3 as text console more often than rstudio for a variety of reasons.

I use it in conjunction with the package R-Box to drive where I want to send the code to: either to the R console, or with SublimeREPL R to direct the code to Sublime itself splitting the screen in two and sending the code to the right hand of the screen where I run the R console.

Normally I configure R-Box user settings with R, and SublimeREPL specifying the R path as /usr/bin/R (see below).

Results (sadly)

R-Box & R does not work: it cannot find the RRO app (even changing the name of the app from RRO to R it does not find it).
R-Box & SublimeREPL (i.e. the console in the right side of the screen) shows the console OK, but there is no visible prompt, hence it is of no use.
These are the R scripts that work with CRAN R:

R-Box

{
"App": "R",
"osx":
{
"App": "SublimeREPL"
}

}

SublimeREPL

{
"default_extend_env": {"PATH": "{PATH};/usr/bin/R"},
"show_transferred_text": true

}

I did not think to post the issue I posted in stackoverflow here in the first place: apologies!
See http://stackoverflow.com/questions/26494145/issues-with-revolution-r-open-yosemite-sublime-text

R-box suddenly not working

Hi

I've been using R-box happily for a long time. But today it's suddenly not working. There's no syntax highlighting, and none of the short-cut keys work. I've removed and re-installed it a number of times.

Settings are as follows;

{
"R64": "C:\Program Files\R\R-3.1.3\bin\x64\Rgui.exe",
"auto_advance": true,
"auto_completions": true,
"prog": "R64",
"status_bar_hint": true
}

The path to R is correct. Settings are under Packages/User/...

Thanks

Nick

How to extend "Execute in block" feature?

I love r-box and I use with many other languages (because it works). However "execute in block" feature does not work in languages where function is defined without {}. Is it hard to make it work with this kind of syntax?:

function foo() 
  a = 1
  b = 2
  return a + b
end

I read the code and found that it uses a fancy regex to grab functions. So decided to ask you for an advice before diving deeper.

Thanks.

terminal/iterm problem

Hello,
when I select several lines of syntax and send them from ST to terminal or iterm, I get this type of error:

adm2 <- fre
Error: object 'fre' not found

The original line was:

adm2 <- fread("rawdata/institution/ic2012_data_stata.csv")

In other words, the syntax line is cut. If I select just that line, there is no problem.
Thanks!

ctrl+enter sends extra enter to R console in 2.1.1

I have reverted back to version 2.0.6 which works fine. I have not tried the intermediate versions.

I am running Sublime Text build 3065, R 3.1.1.

Unrelated: I have changed the behaviour of ctrl+b to save before sending executing "r_box_source_code".

Snippet directory named "R" apparently ignored; ST3, Mac OSX 10.9.4

With Sublime Text 3's default R syntax disabled, it seems that R-Box ignores my snippet directory, located under ~/Library/Application Support/Sublime Text 3/Packages/User, if it is named "R" (or "r"); curiously, when the default R syntax is enabled I don't have the same problem. See here: http://youtu.be/tj1js5pwZTA.

(I dunno if it makes sense to say that R-Box seems to "ignore" my directory, but that's how it seems to me.)

  • ST3
  • Mac OSX 10.9.4

Highlighting multiple lines causes ST2 to crash

Hi Randy,

When I highlight multiple lines of any R script in ST2 the application crashes. When I uninstall R-Box it does not freeze when I highlight text inside of R scripts. ST2 does not freeze when I highlight text inside of other types of scripts.

OS X 10.10.2, fresh installs of ST2 and R-Box as of this evening.

Thanks for the help!

Reindent patches

When I re-indent a function like:

function_example <- function (a) 
  a + 1

I get

function_example <- function (a) 
a + 1

It should not do this.

function hint

Hi Randy,

I'm using ST3 and R-Box 2.0.4 under Ubuntu 14.04 and tmux R. It seems no hints were showed in status bar as you mentioned in this and enhanced-R packages. Shall I modify something to enable this function?

Thanks for the wonderful package.

James

Error when wanting to open Rgui

When I try to open the external R window (e.g, press Ctrl+Enter) Rgui does not open and the following error message appears: http://imgur.com/wTcvLUm. It worked until Friday.

INFO
I am on Windows 7, 64 Bit, R-Box v2.3.1

I do set the path to R manually in the Package settings - R-Box - Settings User via

{
// path to Rgui.exe (for windows only)
"R64": "C:\Programme\R\R-3.1.2\bin\x64\Rgui.exe",
}
(using double backslashes)

Sweave Build File is more like knitr tex?

If we want to Sweave - why doesn't the build file looks like this

{
    "selector": "text.tex.latex.rsweave",
    "working_dir": "${project_path:${folder}}",
    "cmd": [ "R CMD Sweave $file --encoding=UTF-8" ],
    "shell": true
}

Calling knitr leads to some issues using sweave only related commands, if one uses real Sweave.

Autocomplete works strange

Sublime autocomplete works somewhat strange (I am only guessing this is due to R-Box). First it only suggests built-in functions...
autocomplete1

... and offers my object when there is no other possibility left.
autocomplete2

Option to modify the path when sourcing a file or setting working directory

I have been using this package (and its predecessor) for about an year now and I love it.

I had a situation in which I was running ST3 on my MacOS but my terminal was running Ubuntu via virtual machine. The virtual machine folders were mounted on the MacOS at this location: /Users/<username>/vm/. Most common reason for such a workflow is because you want to develop on the same OS as production.

Anyways, this meant that I had to modify the path sent from ST3 via R-Box in the following manner:
/Users/<username>/vm/path/to/file.R to /home/ubuntu/path/to/file.R. As an example, instead of sending setwd("/Users/<username>/vm/path/to/file.R") to the terminal, I needed to send this to the terminal: setwd("/home/ubuntu/path/to/file.R").

I did this by modifying the file sendtext.py and the user settings and then re-packaging the R-Box package and using it. This worked great until ST3 updated R-Box automatically and I lost my changes. So, I decided to fork this repository and then make these changes. I have tested the changes on ST3 and everything works nicely. The changes are only a few lines.

Here is the change: https://github.com/ankur-gupta/R-Box/commit/9d87ec117e4df83fd37c72f73be299231de06124

Now, I am not sure if this is something a lot of people would want to have. If there is demand or utility for this, I'd like to send you a pull request. This way I won't have to keep on merging your changes into mine every so often.

Let me know what you think, @randy3k.

Linux: send to terminal

I see the options of tmux and screen, how can I send to R in gnome-terminal, pantheon-termin,... instead.
Many thanks!

Disabling the R package.

So once we install R-Box we should disable the regular "R" syntax package and instead use R-Box for all R files? I'm asking because the README didn't quite make it clear whether the disabling was required or merely optional. What happens if we don't disable the R package? Can we still use "R-Box"?

Sorry if this is a dumb question....

R-box in OSX Maverics, Sublime 3 not working

Hi,
I hope the issues are a good place to post this.
I installed R-box via package control without problems, but it's not running on my system (I have Maverics and Sublime 3). I checked and the User settings include "prog": "R".
I had REPL installed, I tried removing it but it didn't help.
Both R.app and Sublime Text.app are in the same /Applications folder.

I get no error message so I can't give any more information, it's just that hitting cmd+Enter doesn't open R or send any commands to it if R is open. It just inserts a new line in my sublime file.

Thanks

better support RMarkdown syntax

I love writing RMarkdown with R-Box in ST3, but it seems I can't get proper syntax highlighting and REPL-ing/Build System to work at the same time.

If I select AcademicMarkdown as a syntax, highlighting for italics and even @Citations works fine, but no REPL or Build system or R highlighting.

Conversely, If I choose R Markdown, the above works fine, but I loose syntax highlighting for italics and other simple Markdown stuff.

What's up with that? My screw-up, or still a limitation?

Ps.: fantastic work! – It's like magic to have R in your ST3. No more IDEs.

% used for comments

% treated as a comment symbol in Rmd files (i.e., text after the % is grayed out) but will not be when evaluated by knitr

Freezes when opening parenthesis

Sublime text 3 freezes for 1-2 sec when I open a parenthesis after a word in a .R file. I've uninstalled Rbox and everything works fine now. I think this problem appeared after I upgraded to Yosemite. Would you know what's happening?

Ctrl+Enter does not pass a new line to R when plotting device is opened

A bugreport:
After plotting, as long as the plotting device is opened, Crtl+Enter does not pass any lines of code on to R. This happens when I want to pass a single line to R while the plotting window is open. After I close the plotting window manually, passing code works like a charm.

Code to illustrate the issue: Note that the issue arises when passing the code line by line, not at once.

    df = data.frame(x=c(1,1,2)) #will be executed
    plot(df) #will be executed
    # Now suppose I just typed this new line
    mean(df$x) #will not be executed

The issue occurred somwehen within the last version update(s).

Specs:
Windows 7, 64 bit, SublimeText 3, R-Box v2.3.3, using R in an external window.

Autocomplete not seeing period-separated words

In Enhanced-R, ST3 was able to correctly identify period-separated words and autocomplete as expected. This feature seems to be absent from R-Box.
If this was deliberate, can we set a user option to adjust to old behavior?

screen shot 2015-04-19 at 11 04 11 am

Error in running packages.R

Error in file(file, ifelse(append, "a", "w")) :
  cannot open the connection
Calls: cat -> file
In addition: Warning message:
In file(file, ifelse(append, "a", "w")) :
  cannot open file 'packages/base.json': No such file or directory
Execution halted

This failure happens because packages is not yet created. We can either add a line to the packages.R script to create the folder or change the instructions in the README.md to ask the users to create the packages folder themselves.

Further Support

Hi Randy

I'm having problems getting this to work as Sublime Text cannot find R. I've tried

  • uncommenting lines in preferences file
  • adding the folder containing the relevant .exe to my "path" environment variable.

Any help greatly appreciated

Nick

R's Style Guide

It'd be good to have a feature to autoformat the R code according to the style guidelines like this one here

This feature will be like this plugin of the Python - here

Will it be feasible to have this feature here in this plugin?

Path names in windows

The R Sweave build does not work with Windows, because of the path separator ('/' instead of '').

Not communicating with R

Hi,

I am testing lines of code from R-Box. I am on Mac 10.8, R version 3.1.2. The syntax highlighting works fine, but when I try to run code using cmd+return, nothing happens. I've made no changes to the default preference settings. I tried to remove and uninstall the R-Box package and reinstall but the issue persists.

Build with R markdown (.Rmd)

I use Sublime text 3 in Mac OS 10.11 with R 3.2.2 and R-Box 2.6.6

I write markdown in .Rmd file with r code

I selected Build system is R Markdown
build system

When I run Build (cmd+B), this error appears
error

I check the command in console
command

If I run the same command in terminal, it works and gives the out file .md

Can you figure out what was happen here, please?
terminal

Revolution R Open does not work with R-Box

I have installed RRO on a new macbook pro 13" retina (two cores) & Yosemite. I tried with RSTUDIO and R 25 (S. Urbinek notorious benchmark) and I got the test time down from ~31 s to a blazing 5 s (thanks to multithreading and Intel MKL). Marvellous!

The problems are with Sublime text. I use Sublime text 3 as text console more often than rstudio for a variety of reasons.

I use it in conjunction with the package R-Box to drive where I want to send the code to: either to the R console, or with SublimeREPL R to direct the code to Sublime itself splitting the screen in two and sending the code to the right hand of the screen where I run the R console.

Normally I configure R-Box user settings with R, and SublimeREPL specifying the R path as /usr/bin/R (see below).

Results (sadly)

R-Box & R does not work: it cannot find the RRO app (even changing the name of the app from RRO to R it does not find it).
R-Box & SublimeREPL (i.e. the console in the right side of the screen) shows the console OK, but there is no visible prompt, hence it is of no use.
These are the R scripts that work with CRAN R:

R-Box

{
"App": "R",
"osx":
{
"App": "SublimeREPL"
}

}

SublimeREPL

{
"default_extend_env": {"PATH": "{PATH};/usr/bin/R"},
"show_transferred_text": true

}

I did not think to post the issue I posted in stackoverflow here in the first place: apologies!
See http://stackoverflow.com/questions/26494145/issues-with-revolution-r-open-yosemite-sublime-text

Handle multiple R instances

Hello,

I have two issues:

  1. Is there any possibility to send code from ST to two or more different R instances?
  2. When I send a big chunk of code from ST to a terminal running R then the transfer stops from time to time for about 20s before it runs further. I have this problem on Mac OS 10.9.3.

I am very new to GitHub, so I hope that this is the right place to ask for this problems.

However, I would like to thank the creator of R-Box for his great work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.