From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [0][babel][R] Undesired conversion of integers to floats in R code block output Date: Sun, 19 Feb 2012 13:46:15 -0700 Message-ID: <87ehtqeelk.fsf@gmx.com> References: <4F3D53D6.40407@gmail.com> <87boowrtyv.fsf@gmx.com> <4F409E93.5010800@gmail.com> <878vjyg466.fsf@gmx.com> <4F413412.5050108@gmail.com> <4F413F30.60302@gmail.com> <4F414D3D.5010602@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzDeO-0001tJ-7A for emacs-orgmode@gnu.org; Sun, 19 Feb 2012 15:46:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzDeM-0005jT-Qc for emacs-orgmode@gnu.org; Sun, 19 Feb 2012 15:46:28 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:43593) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1RzDeM-0005jK-Ge for emacs-orgmode@gnu.org; Sun, 19 Feb 2012 15:46:26 -0500 In-Reply-To: <4F414D3D.5010602@gmail.com> (Daniel Drake's message of "Sun, 19 Feb 2012 11:27:57 -0800") 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: Daniel Drake Cc: "emacs-orgmode@gnu.org" , Eric Schulte > > A further followup, at the risk of descending into minutia. The > culprit seems to be the emacs function string-to-number. > > On my 32-bit Arch machine: > (string-to-number "123456789"): 123456789 (#o726746425, #x75bcd15) > (string-to-number "987654321"): 987654321.0 > GNU Emacs 23.4.1 (i686-pc-linux-gnu, GTK+ Version 2.24.9) of > 2012-02-01 on shirley.hoetzel.info > > On a 64-bit Ubuntu (11.10) machine: > (string-to-number "123456789"): 123456789 (#o726746425, #x75bcd15) > (string-to-number "987654321"): 987654321 (#o7267464261, #x3ade68b1) > GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.5) of > 2011-08-14 on allspice, modified by Debian > Ah, nice debugging! That must be the issue, as I'm working on a 64-bit machine. Maybe one workaround could be to prefix the numbers with a letter in R-land so that emacs interprets them as strings. Cheers, -- Eric Schulte http://cs.unm.edu/~eschulte/