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: Eric Schulte
Subject: Re: [O] R code block produces only partial output
Date: Tue, 05 Aug 2014 15:02:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Charles Berry <address@hidden> writes:

> 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  "\\." ?
>

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.

>
> HTH,
>
> Chuck
>
>

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D (see https://u.fsf.org/yw)



reply via email to

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