From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: table column with trailing 0s Date: Tue, 27 Mar 2012 11:59:40 -1000 Message-ID: References: <87y5qlak39.fsf@med.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SCeQg-0004YI-9V for emacs-orgmode@gnu.org; Tue, 27 Mar 2012 17:59:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SCeQb-0001xX-5V for emacs-orgmode@gnu.org; Tue, 27 Mar 2012 17:59:49 -0400 Received: from oproxy4-pub.bluehost.com ([69.89.21.11]:47820) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1SCeQa-0001wg-SQ for emacs-orgmode@gnu.org; Tue, 27 Mar 2012 17:59:45 -0400 In-Reply-To: <87y5qlak39.fsf@med.uni-goettingen.de> (Andreas Leha's message of "Tue, 27 Mar 2012 22:02:18 +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: Andreas Leha Cc: emacs-orgmode@gnu.org 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 -- Thomas S. Dye http://www.tsdye.com