From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: table column with trailing 0s Date: Wed, 28 Mar 2012 00:24:21 +0200 Message-ID: <87pqbxadii.fsf@med.uni-goettingen.de> References: <87y5qlak39.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:33913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCep6-0003Yt-NV for emacs-orgmode@gnu.org; Tue, 27 Mar 2012 18:25:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCep4-00070J-Ri for emacs-orgmode@gnu.org; Tue, 27 Mar 2012 18:25:04 -0400 Received: from plane.gmane.org ([80.91.229.3]:57394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCep4-0006yZ-Kx for emacs-orgmode@gnu.org; Tue, 27 Mar 2012 18:25:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SCep1-0006jd-GR for emacs-orgmode@gnu.org; Wed, 28 Mar 2012 00:24:59 +0200 Received: from 134.76.2.86 ([134.76.2.86]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Mar 2012 00:24:59 +0200 Received: from andreas.leha by 134.76.2.86 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 28 Mar 2012 00:24:59 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org tsd@tsdye.com (Thomas S. Dye) writes: > Andreas Leha 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