Re: [O] R code block produces only partial output

2014-09-01 Thread Charles C. Berry
On Sun, 31 Aug 2014, Aaron Ecay wrote: Hi Chuck, Attached is a new version of the patch, including a few more tests. I have one question: 2014ko abuztuak 28an, Aaron Ecay-ek idatzi zuen: but the patch here uses on.exit(file.create(...)) to ensure that that file is created. One hiccup (not su

Re: [O] R code block produces only partial output

2014-08-31 Thread Aaron Ecay
Hi Chuck, Attached is a new version of the patch, including a few more tests. I have one question: 2014ko abuztuak 28an, Aaron Ecay-ek idatzi zuen: >> but the patch here uses on.exit(file.create(...)) to ensure that that >> file is created. One hiccup (not sure if it exists in master,too) is >>

Re: [O] R code block produces only partial output

2014-08-27 Thread Aaron Ecay
Hi Chuck, Thanks for your feedback. The patch you’ve sent looks basically correct to me. 2014ko abuztuak 23an, "Charles C. Berry"-ek idatzi zuen: [...] > The old hacky way works pretty well most of the time. I suspect that it > will be hard to get folks to really test a new ob-R.el in advance

Re: [O] R code block produces only partial output

2014-08-23 Thread Charles C. Berry
Aaron, Some comments inline. A patch that modifies what you have done is attached. Apart from adding `org-babel-local-file-name' in two places, I think it is functionally that same as yours, but I find the R code easier to follow. On Sat, 16 Aug 2014, Aaron Ecay wrote: Hi Chuck, Thanks

Re: [O] R code block produces only partial output

2014-08-23 Thread Ista Zahn
On Sat, Aug 23, 2014 at 2:35 PM, Thomas S. Dye wrote: > Aaron Ecay writes: > >> Well, I think that it’s going to be difficult to make babel a better >> literate programming solution for R if we restrict ourselves not to >> use the state-of-the-art R package for low-level literate programming >> s

Re: [O] R code block produces only partial output

2014-08-23 Thread Thomas S. Dye
Aaron Ecay writes: > Well, I think that it’s going to be difficult to make babel a better > literate programming solution for R if we restrict ourselves not to > use the state-of-the-art R package for low-level literate programming > support. Org is full of features which one needs to install ot

Re: [O] R code block produces only partial output

2014-08-23 Thread Aaron Ecay
Here’s another version of the previous patch which fixes a couple bugs related to 1) changing the window configuration unwarrantedly 2) syntactically invalid R code (mismatched parens or quotes) could hang emacs It’s easy to get R to throw an error in the mismatched-parens case, but more diffic

Re: [O] R code block produces only partial output

2014-08-23 Thread Andreas Kiermeier
Hi Aaron, thanks for keeping on this. I personally don't have a problem with requiring an R package. In fact, users will have a rather limited experience with R if they cannot install add-on packages (for whatever reason) - this is one of the things that makes R such an attractive option for data a

Re: [O] R code block produces only partial output

2014-08-23 Thread Aaron Ecay
2014ko abuztuak 19an, Achim Gratz-ek idatzi zuen: > > Aaron Ecay writes: >> R is capable of installing packages to a user-specified directory, >> without requiring root or any other special privileges. So IT cannot >> literally prevent R users from installing their own packages; > > They can, al

Re: [O] R code block produces only partial output

2014-08-18 Thread Achim Gratz
Aaron Ecay writes: > R is capable of installing packages to a user-specified directory, > without requiring root or any other special privileges. So IT cannot > literally prevent R users from installing their own packages; They can, all they have to do is to take away the ability to connect to th

Re: [O] R code block produces only partial output

2014-08-18 Thread Aaron Ecay
Hi Achim, 2014ko abuztuak 17an, Achim Gratz-ek idatzi zuen: > I take it you've never dealt with a corporate IT department. Go to > dilbert.com and do a search for "Mordac" to get an idea what you'd be up > against. I’ve read Dilbert, and am familiar with the Mordac character. R is capable of in

Re: [O] R code block produces only partial output

2014-08-16 Thread Achim Gratz
Aaron Ecay writes: >> The user would need to install it in her private directory if it >> is not on the system; some shops actually discourage this. > ^^^ > > That’s ... special. Do you have experience with such environments? I take it you'

Re: [O] R code block produces only partial output

2014-08-16 Thread Aaron Ecay
Hi Chuck, Thanks for your feedback. 2014ko abuztuak 16an, "Charles C. Berry"-ek idatzi zuen: > Aaron, > > I think doing something along these lines makes sense. evaluate() obviates > the need for tryCatch() and capture.output(), and it makes customizing > error/warning/message stuff clean. Its

Re: [O] R code block produces only partial output

2014-08-16 Thread Charles C. Berry
On Fri, 15 Aug 2014, Aaron Ecay wrote: Hi Chuck, hi all, Attached to this message is a draft patch to complete this idea. It should address the issue of including warnings, errors, and messages in output. It uses the “evaluate” R package, originally created for the knitr literate programming

Re: [O] R code block produces only partial output

2014-08-15 Thread Aaron Ecay
Hi Chuck, hi all, Attached to this message is a draft patch to complete this idea. It should address the issue of including warnings, errors, and messages in output. It uses the “evaluate” R package, originally created for the knitr literate programming system, to do most of the heavy lifting, a

Re: [O] R code block produces only partial output

2014-08-09 Thread Rainer M Krug
"Charles C. Berry" writes: > On Thu, 7 Aug 2014, Aaron Ecay wrote: > >> Hi Chuck, >> >> Thanks for your feedback. >> >> 2014ko abuztuak 7an, "Charles C. Berry"-ek idatzi zuen: >>> Hi Aaron, >>> >>> I like what you are trying to do, but ... >>> >>> 1) The change has at least one bug: Remote sessio

Re: [O] R code block produces only partial output

2014-08-09 Thread Rainer M Krug
"Charles C. Berry" writes: > On Wed, 6 Aug 2014, Aaron Ecay wrote: > >> Hi Eric, >> >> 2014ko abuztuak 6an, Eric Schulte-ek idatzi zuen: >> >> [...] >> >>> Perhaps you could begin with a patch for the regexp issue in this >>> thread? >> >> I have pushed a patch which allows us to avoid the regex

Re: [O] R code block produces only partial output

2014-08-07 Thread Thomas S. Dye
"Charles C. Berry" writes: > As for stopping on error, I think that anything that changes current > behavior at this late date ought to be configurable. +1, e.g., silent, message, stop. All the best, Tom -- Thomas S. Dye http://www.tsdye.com

Re: [O] R code block produces only partial output

2014-08-07 Thread Charles C. Berry
On Thu, 7 Aug 2014, Aaron Ecay wrote: Hi Chuck, Thanks for your feedback. 2014ko abuztuak 7an, "Charles C. Berry"-ek idatzi zuen: Hi Aaron, I like what you are trying to do, but ... 1) The change has at least one bug: Remote sessions are broken by this change. 2) The behavior of :results o

Re: [O] R code block produces only partial output

2014-08-07 Thread Aaron Ecay
Hi Chuck, Thanks for your feedback. 2014ko abuztuak 7an, "Charles C. Berry"-ek idatzi zuen: > Hi Aaron, > > I like what you are trying to do, but ... > > 1) The change has at least one bug: Remote sessions are broken by this > change. > > 2) The behavior of :results output is modified in ways

Re: [O] R code block produces only partial output

2014-08-07 Thread Charles C. Berry
On Wed, 6 Aug 2014, Aaron Ecay wrote: Hi Eric, 2014ko abuztuak 6an, Eric Schulte-ek idatzi zuen: [...] Perhaps you could begin with a patch for the regexp issue in this thread? I have pushed a patch which allows us to avoid the regex issue entirely by using a native R method to capture the

Re: [O] R code block produces only partial output

2014-08-06 Thread Aaron Ecay
Hi Eric, 2014ko abuztuak 6an, Eric Schulte-ek idatzi zuen: [...] > Perhaps you could begin with a patch for the regexp issue in this > thread? I have pushed a patch which allows us to avoid the regex issue entirely by using a native R method to capture the session output to a file. This introd

Re: [O] R code block produces only partial output

2014-08-06 Thread Charles C. Berry
On Tue, 5 Aug 2014, Aaron Ecay wrote: Hi Chuck, 2014ko abuztuak 5an, "Charles C. Berry"-ek idatzi zuen: [...] Here is the docstring from ESS's inferior-S-prompt: inferior-S-prompt is a variable defined in `ess-custom.el'. Its value is "[]a-zA-Z0-9.[]*\\([>+.] \\)*> " [snip] Note

Re: [O] R code block produces only partial output

2014-08-06 Thread Eric Schulte
Aaron Ecay writes: > Hi Eric, > > 2014ko abuztuak 5an, Eric Schulte-ek idatzi zuen: >> > > [...] > >> I don't know. >> >> The Babel R support needs a dedicated maintainer. This was a role Dan >> Davison originally filled. I've partially filled in since, but as a >> *very* light R user I'm not

Re: [O] R code block produces only partial output

2014-08-05 Thread Aaron Ecay
Hi Eric, 2014ko abuztuak 5an, Eric Schulte-ek idatzi zuen: > [...] > I don't know. > > The Babel R support needs a dedicated maintainer. This was a role Dan > Davison originally filled. I've partially filled in since, but as a > *very* light R user I'm not the best person. I use babel’s R s

Re: [O] R code block produces only partial output

2014-08-05 Thread Aaron Ecay
Hi Chuck, 2014ko abuztuak 5an, "Charles C. Berry"-ek idatzi zuen: [...] > > > Here is the docstring from ESS's inferior-S-prompt: > > inferior-S-prompt is a variable defined in `ess-custom.el'. > Its value is "[]a-zA-Z0-9.[]*\\([>+.] \\)*> " > > Documentation: > Regexp used in S and R inferi

Re: [O] R code block produces only partial output

2014-08-05 Thread Charles C. Berry
On Tue, 5 Aug 2014, Andreas Kiermeier wrote: ​ On 6 August 2014 03:35, Charles Berry wrote: ​[snip]​ org-babel-R-evaluate-session uses (string-match "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) to find the start of R output in the session. [snip] ​ Thanks Charles for finding this

Re: [O] R code block produces only partial output

2014-08-05 Thread Andreas Kiermeier
​ On 6 August 2014 03:35, Charles Berry wrote: ​[snip]​ > org-babel-R-evaluate-session uses > > (string-match "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-9]+\\|[ ]\\)" line) > > to find the start of R output in the session. > > This does not match the ` 0', but matches the ` .6' > in the out

Re: [O] R code block produces only partial output

2014-08-05 Thread Charles C. Berry
On Tue, 5 Aug 2014, John Hendy wrote: On Tue, Aug 5, 2014 at 2:02 PM, Eric Schulte wrote: Charles Berry writes: Eric Schulte gmail.com> writes: [snip] Eric, As noted by Andreas and John this is a problem for session output. org-babel-R-evaluate-session uses (string-match "^\\([ ]*[

Re: [O] R code block produces only partial output

2014-08-05 Thread Nick Dokos
Nick Dokos writes: > John Hendy writes: > >> On Tue, Aug 5, 2014 at 2:02 PM, Eric Schulte wrote: >>> Charles Berry writes: >>> Eric Schulte gmail.com> writes: >> >> [snip] >> Eric, As noted by Andreas and John this is a problem for session output. org-babel-R-eva

Re: [O] R code block produces only partial output

2014-08-05 Thread Nick Dokos
John Hendy writes: > On Tue, Aug 5, 2014 at 2:02 PM, Eric Schulte wrote: >> Charles Berry writes: >> >>> Eric Schulte gmail.com> writes: > > [snip] > >>> Eric, >>> >>> As noted by Andreas and John this is a problem for session output. >>> >>> org-babel-R-evaluate-session uses >>> >>> (string-

Re: [O] R code block produces only partial output

2014-08-05 Thread John Hendy
On Tue, Aug 5, 2014 at 2:02 PM, Eric Schulte wrote: > Charles Berry writes: > >> Eric Schulte gmail.com> writes: [snip] >> Eric, >> >> As noted by Andreas and John this is a problem for session output. >> >> org-babel-R-evaluate-session uses >> >> (string-match "^\\([ ]*[>+\\.][ ]?\\)+\\([[0-

Re: [O] R code block produces only partial output

2014-08-05 Thread Eric Schulte
Charles Berry writes: > Eric Schulte gmail.com> writes: > >> >> Andreas Kiermeier gmail.com> writes: >> >> > On 4 August 2014 21:23, Eric Schulte gmail.com> wrote: >> >> Why are you setting the output type to "graphics" when you are trying to > >> >> Hi Andreas, >> >> I can't reproduce you

Re: [O] R code block produces only partial output

2014-08-05 Thread Charles Berry
Eric Schulte gmail.com> writes: > > Andreas Kiermeier gmail.com> writes: > > > On 4 August 2014 21:23, Eric Schulte gmail.com> wrote: > >> Why are you setting the output type to "graphics" when you are trying to > > Hi Andreas, > > I can't reproduce your problem. I get the following from

Re: [O] R code block produces only partial output

2014-08-04 Thread Andreas Kiermeier
On 5 August 2014 13:30, John Hendy wrote: > I can reproduce with a minimal config and on Linux (to toss in a > confirmation). I *also* accidentally just stumbled on a way I can > toggle the behavior between correct and incorrect! It arose because my > file was not able to use the #+PROPERTY settin

Re: [O] R code block produces only partial output

2014-08-04 Thread John Hendy
On Mon, Aug 4, 2014 at 7:46 PM, Andreas Kiermeier wrote: > Hi Eric, > I'm running Org 8.2.7c (via ELPA) and ESS 14.05. > I've tried to run with a minimal Org setup using only the following in > my init file. > The shortcut I use to start Emacs (on Windows 8.1) is: > C:\emacs\bin\runemacs.exe -Q -l

Re: [O] R code block produces only partial output

2014-08-04 Thread Andreas Kiermeier
Hi Eric, I'm running Org 8.2.7c (via ELPA) and ESS 14.05. I've tried to run with a minimal Org setup using only the following in my init file. The shortcut I use to start Emacs (on Windows 8.1) is: C:\emacs\bin\runemacs.exe -Q -l "C:\emacs\bin\minimal-org.el" However, the results are the same as b

Re: [O] R code block produces only partial output

2014-08-04 Thread Eric Schulte
Andreas Kiermeier writes: > On 4 August 2014 21:23, Eric Schulte wrote: >> Why are you setting the output type to "graphics" when you are trying to >> return text? I think that may be the source of your problem. > > Hi Eric, > thanks for the quick response. > I've had 'graphics' from my main da

Re: [O] R code block produces only partial output

2014-08-04 Thread Andreas Kiermeier
On 4 August 2014 21:23, Eric Schulte wrote: > Why are you setting the output type to "graphics" when you are trying to > return text? I think that may be the source of your problem. Hi Eric, thanks for the quick response. I've had 'graphics' from my main data analysis file ... I think I got that

Re: [O] R code block produces only partial output

2014-08-04 Thread Eric Schulte
Hi Andreas, Why are you setting the output type to "graphics" when you are trying to return text? I think that may be the source of your problem. Best, Eric Andreas Kiermeier writes: > Hi all, > > I've been using Org mode (latest version - see my set up below) to > perform some data analysis

[O] R code block produces only partial output

2014-08-04 Thread Andreas Kiermeier
Hi all, I've been using Org mode (latest version - see my set up below) to perform some data analysis and have come across a problem evaluating R code blocks. I usually use a session when working and when evaluating a code block with describe (R package "rms") and a quantitative variable the resul