From mboxrd@z Thu Jan 1 00:00:00 1970 From: Austin Frank Subject: [babel] apply #+TABLEFM lines during export? Date: Sat, 10 Jul 2010 10:13:46 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1003482575==" Return-path: Received: from [140.186.70.92] (port=45952 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OXaog-00080X-Qv for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 10:14:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OXaof-0004lb-8O for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 10:14:06 -0400 Received: from lo.gmane.org ([80.91.229.12]:37590) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OXaoe-0004lL-Rn for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 10:14:05 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OXaob-000815-Hx for emacs-orgmode@gnu.org; Sat, 10 Jul 2010 16:14:01 +0200 Received: from adsl-75-33-38-114.dsl.bcvloh.sbcglobal.net ([75.33.38.114]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Jul 2010 16:14:01 +0200 Received: from austin.frank by adsl-75-33-38-114.dsl.bcvloh.sbcglobal.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 10 Jul 2010 16:14:01 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============1003482575== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable Hi all-- I have a (hopefully quick question) about formatting tabular output from ob-R. Consider the following block: =2D-8<---------------cut here---------------start------------->8--- #+source: anova-example #+BEGIN_SRC R :cache yes :exports results :colnames yes :results value library(ez) library(lme4) eza <- ezANOVA(dv =3D .(Reaction), sid =3D .(Subject), within =3D .(Days), data =3D sleepstudy) print(eza$ANOVA) #+END_SRC =2D-8<---------------cut here---------------end--------------->8--- This produces the following output: =2D-8<---------------cut here---------------start------------->8--- #+results[7e7015e41d95ed8986fb9a211a8b5c6e121ae99d]: anova-example | Effect | DFn | DFd | SSn | SSd | = F | p | p<.05 | pes | |--------+-----+-----+-----------------+------------------+----------------= --+----------------------+-------+------------------| | Days | 9 | 153 | 166235.12250176 | 151101.038615303 | 18.702697932638= 3 | 8.99534541600196e-21 | * | 0.52384550792003 | =2D-8<---------------cut here---------------end--------------->8--- That's more precision than I want in export, so I add a formula line to the results, hoping to change the formatting of the floats. After hitting C-u C-u C-c C-c in the table, I get the following: =2D-8<---------------cut here---------------start------------->8--- #+results[7e7015e41d95ed8986fb9a211a8b5c6e121ae99d]: anova-example | Effect | DFn | DFd | SSn | SSd | F | p | p<.05= | pes | |--------+-----+-----+-------------+-------------+---------+--------+------= -+--------| | Days | 9 | 153 | 166235.1200 | 151101.0400 | 18.7027 | 0.0000 | * = | 0.5238 | #+TBLFM: $4=3D$4;%.4f::$5=3D$5;%.4f::$6=3D$6;%.4f::$7=3D$7;%.4f::$9=3D$9;%.= 4f =2D-8<---------------cut here---------------end--------------->8--- That's much better! But, if I export this section to LaTeX, the formula line is not applied and I end up with the full precision in my table. =2D-8<---------------cut here---------------start------------->8--- \begin{center} \begin{tabular}{lrrrrrrlr} Effect & DFn & DFd & SSn & SSd & = F & p & p<.05 & pes \\ \hline Days & 9 & 153 & 166235.12250176 & 151101.038615303 & 18.702= 6979326383 & 8.99534541600196e-21 & * & 0.52384550792003 \\ \end{tabular} \end{center} =2D-8<---------------cut here---------------end--------------->8--- Is there a way to make sure that the table formula is applied to the results block during export? Alternatively, is there another way to reduce the precision of the numbers produced during export? Thanks for any help! /au =2D-=20 Austin Frank http://aufrank.net GPG Public Key (D7398C2F): http://aufrank.net/personal.asc --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) iEYEARECAAYFAkw4gBoACgkQlHMl2/XbR4HRDQCfak4IcjpGwebPNLS//CE/VvPO Ra0AoNgGv3yxpbg4lM3rVghLTnaQkRRE =+UY/ -----END PGP SIGNATURE----- --=-=-=-- --===============1003482575== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1003482575==--