From daniel.sabanesbove at campus.lmu.de  Sun Jan  4 18:54:48 2009
From: daniel.sabanesbove at campus.lmu.de (=?ISO-8859-15?Q?Daniel_Saban=E9s_Bov=E9?=)
Date: Sun, 04 Jan 2009 18:54:48 +0100
Subject: [Rd] cat cannot write more than 10000 characters? [R 2.8.1]
Message-ID: <4960F7E8.2000705@campus.lmu.de>

Hi,

during the examination of a Sweave hang-up inside an odfWeave call (OOo
XMLs have looong lines) I have discovered that my cat function cannot
write more than 10000 characters to a text file. Otherwise, the internal
C code causes a hang-up, which can only be stopped with a quit signal
that terminates the R session. Is this behavior normal?

Code to reproduce this:

testChunk <- paste(rep("a", 10000 + 1), ## delete "+ 1" to be successful
                   collapse="")
output <- tempfile()
cat(testChunk, sep = "\n", file = output, append = TRUE)

My sessionInfo:

R version 2.8.1 (2008-12-22)
i686-pc-linux-gnu (actually the latest openSuse 11.1)
locale:
LC_CTYPE=de_DE.UTF-8;LC_NUMERIC=C;LC_TIME=de_DE.UTF-8;LC_COLLATE=de_DE.UTF-8;LC_MONETARY=C;LC_MESSAGES=de_DE.UTF-8;LC_PAPER=de_DE.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=de_DE.UTF-8;LC_IDENTIFICATION=C

Thanks in advance,
Daniel



[Rd] cat cannot write more than 10000 characters? [R 2.8.1]
=?ISO-8859-15?Q?Daniel_Saban=E9s_Bov=E9?=