From asfe at di.fc.ul.pt  Tue Feb 19 15:50:09 2008
From: asfe at di.fc.ul.pt (asfe at di.fc.ul.pt)
Date: Tue, 19 Feb 2008 15:50:09 +0100 (CET)
Subject: [Rd] Incorrect paste() output (PR#10801)
Message-ID: <20080219145009.A3B95282EF48@mail.pubhealth.ku.dk>

Hello,

I am writing this message because of an incorrect output by paste(). 
Please try the following script to see if the evidence I collected is 
reproducible:

x <- c(10152, 28177);
y <- c(9576, 26625);
d <- y - x;

d;
[1]  -576 -1552

paste(d, collapse = ", ");
[1] "-576, -1552"

x <- x / 1000;
y <- y / 1000;
d <- y - x;

d;
[1] -0.576 -1.552

paste(d, collapse = ", ");
[1] "-0.575999999999999, -1.552"

The output of the last paste() is incorrect. I am using R version 2.6.1.

Thank you.

-- 
Ant?nio Ferreira - http://www.di.fc.ul.pt/~asfe
Assistant Lecturer - Department of Informatics
Faculty of Sciences - University of Lisbon - PT



[Rd] Incorrect paste() output (PR#10801)
asfe at di.fc.ul.pt