emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Charles Berry
Subject: Re: [O] R code block produces only partial output
Date: Tue, 5 Aug 2014 18:05:08 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Eric Schulte <schulte.eric <at> gmail.com> writes:

> 
> Andreas Kiermeier <andreas.kiermeier <at> gmail.com> writes:
> 
> > On 4 August 2014 21:23, Eric Schulte <schulte.eric <at> 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 your minimal
> example when run in an Org-mode file, and from the command line.  They
> are identical.  Are you using the latest version of Org-mode?
> 
> Best,
> Eric
> 
[snip]
> 
> [Previously saved workspace restored]
> 
> > x <- rnorm(100)
> > y <- quantile(x, probs=seq(0,1,0.1))
> > names(y) <- 
as.character(c("0",".1",".2",".3",".4",".5",".6",".7",".8",".9","1"))
> > y
>           0          .1          .2          .3          .4          .5 
> -2.53624773 -1.30846042 -0.70659822 -0.43565010 -0.24318346 -0.01034625 
>          .6          .7          .8          .9           1 
>  0.24125644  0.49945059  0.92032314  1.36423669  2.83357915 
> >
> 
> 
> 


Eric,

As noted by Andreas and John this is a problem for session output.

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 output you show above, so if that had been in a session, all the 
output up to and including the '.' before the '6' would be clipped
by the following

  (substring line (match-end 1))


as Andreas output showed. 

Deleting the "\\." fixes Andreas case, but what are the circumstances 
requiring the  "\\." ?

HTH,

Chuck




reply via email to

[Prev in Thread] Current Thread [Next in Thread]