[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] table not returned
From: |
Nick Dokos |
Subject: |
Re: [O] table not returned |
Date: |
Wed, 28 Mar 2012 08:45:38 -0400 |
Andreas Leha <address@hidden> wrote:
>
> Hi Bastien,
>
> thanks for looking into this!
>
>
> Bastien <address@hidden> writes:
>
> > Andreas Leha <address@hidden> writes:
> >
> >> #+begin_src R :results table
> >> data.frame(parameter=c("parameter", "", "param1"),
> >> mean=c("mean sd", "", "1.1 0.1"),
> >> median=c("median", "(minimum;maximum)", "1 (1;2)"))
> >> #+end_src
> >>
> >> #+results:
> >
> > I can't test this because of the character.
> ^^^^^
> This character got lost on the mailing list. I guess the offending
> character was the plus-minus character.
>
> This should be testable, I hope:
>
> ,----
> | #+begin_src R :results table
> | data.frame(parameter=c("parameter", "", "param1"),
> | mean=c("mean +- sd", "", "1.1 +- 0.1"),
> | median=c("median", "(minimum;maximum)", "1 (1;2)"))
> | #+end_src
> |
> | #+results:
> `----
>
> Again, this works as expected, if "(minimum" is replaced by "minimum".
>
This happens in org-babel-import-elisp-from-file, when org-babel-string-read
is mapped on each row. To wit:
(org-babel-string-read "foo)") --> "foo)"
but
(org-babel-string-read "(foo)") --> Error
The backtrace for the error says:
,----
| Debugger entered--Lisp error: (void-function foo)
| (foo)
| eval((foo))
| (if (and (not inhibit-lisp-eval) (member (substring cell 0 1) (quote ("("
"'" "`" "[")))) (eval (read cell)) (if (string= (substring cell 0 1) "\"")
(read cell) (progn (set-text-properties 0 (length cell) nil cell) cell)))
| (or (org-babel-number-p cell) (if (and (not inhibit-lisp-eval) (member
(substring cell 0 1) (quote ("(" "'" "`" "[")))) (eval (read cell)) (if
(string= (substring cell 0 1) "\"") (read cell) (progn (set-text-properties 0
(length cell) nil cell) cell))))
| (if (and (stringp cell) (not (equal cell ""))) (or (org-babel-number-p
cell) (if (and (not inhibit-lisp-eval) (member (substring cell 0 1) (quote ("("
"'" "`" "[")))) (eval (read cell)) (if (string= (substring cell 0 1) "\"")
(read cell) (progn (set-text-properties 0 (length cell) nil cell) cell)))) cell)
| org-babel-read("(foo)")
| org-babel-string-read("(foo)")
`----
Nick