emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* table column with trailing 0s
@ 2012-03-27 20:02 Andreas Leha
  2012-03-27 21:59 ` Thomas S. Dye
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Leha @ 2012-03-27 20:02 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: table column with trailing 0s
  2012-03-27 20:02 table column with trailing 0s Andreas Leha
@ 2012-03-27 21:59 ` Thomas S. Dye
  2012-03-27 22:24   ` Andreas Leha
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas S. Dye @ 2012-03-27 21:59 UTC (permalink / raw)
  To: Andreas Leha; +Cc: emacs-orgmode


Andreas Leha <andreas.leha@med.uni-goettingen.de> 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

-- 
Thomas S. Dye
http://www.tsdye.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: table column with trailing 0s
  2012-03-27 21:59 ` Thomas S. Dye
@ 2012-03-27 22:24   ` Andreas Leha
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Leha @ 2012-03-27 22:24 UTC (permalink / raw)
  To: emacs-orgmode

tsd@tsdye.com (Thomas S. Dye) writes:

> Andreas Leha <andreas.leha@med.uni-goettingen.de> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-27 22:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-27 20:02 table column with trailing 0s Andreas Leha
2012-03-27 21:59 ` Thomas S. Dye
2012-03-27 22:24   ` Andreas Leha

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).