[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] table column with trailing 0s
From: |
Andreas Leha |
Subject: |
Re: [O] table column with trailing 0s |
Date: |
Wed, 28 Mar 2012 00:24:21 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) |
address@hidden (Thomas S. Dye) writes:
> Andreas Leha <address@hidden> writes:
>
>> Hi all,
>>
>> I am trying to get a table generated from R to be pretty printed in
>> org mode (and the export).
>>
>> Suppose, I have a table like this (typical statistical table):
>>
>> #+attr_latex: align=lr
>> #+begin_src R :colnames yes :exports results
>> data.frame(parameter=c("param1", "param2", "param3", "param4"),
>> pvalue=c("0.80", "0.15", "*0.03*", "*< 0.01*"))
>> #+end_src
>>
>> #+results:
>> | parameter | pvalue |
>> |-----------+----------|
>> | param1 | 0.8 |
>> | param2 | 0.15 |
>> | param3 | *0.03* |
>> | param4 | *< 0.01* |
>>
>> Here, org mode strips the trailing 0 from param1 which makes the
>> table a lot less readable.
>>
>> How can I tell org not to trim the contents of string(!) columns?
>>
>> Regards,
>> Andreas
>>
>>
>>
> Aloha Andreas,
>
> I've been very happy using David Hajage's ascii package for R. See
> http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-R.html#sec-4-2
> for a few examples of how it works with tabular and non-tabular data.
>
> hth,
> Tom
Hi Tom,
thanks for this pointer. I have used the ascii package on several
occasions already, but completely forgot about it this time.
Cheers,
Andreas