Bug 15250 - read.dcf reported correctly that it has reached its limit on long lines
read.dcf reported correctly that it has reached its limit on long lines
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Analyses
R 2.15.3
All All
: P5 enhancement
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-01 16:57 UTC by Marco Blanchette
Modified: 2013-07-12 14:25 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marco Blanchette 2013-04-01 16:57:04 UTC
read.dcf() restricts it's line input to 8192 characters. Neither the Debian or the R documentation reports such limits for instance

this works:

cat("test:",paste(sample(letters,8184,TRUE),collapse=""),"\n",file="test.dcf");t <- read.dcf("test.dcf")

While this breaks

cat("test:",paste(sample(letters,8185,TRUE),collapse=""),"\n",file="test.dcf");t <- read.dcf("test.dcf")

Is that expected behavior or a bug?

Thanks
Comment 1 Duncan Murdoch 2013-04-02 19:11:18 UTC
It isn't a bug, but it's something that could be changed (or should be documented if it is not changed).  Do you have an application where DCF files have such long lines?  What is it?
Comment 2 Duncan Murdoch 2013-04-06 15:21:05 UTC
Since we've heard no need for a code change, I'll document this limitation.
Comment 3 Duncan Murdoch 2013-04-06 15:36:32 UTC
This message was apparently lost somehow:

On 13-04-06 10:26 AM, Blanchette, Marco wrote:
> Duncan, I did email the bug report list with my need to have read.dcf() read long line... See below. But if you feel it's not worth the effort, just document it... I have a workaround that works for now...
> [Bug 15250] read.dcf crashes on long lines
> I do. I am using H. Pages BSgenome package to read in data. His package
> uses read.dcf() to read a seed file containing chromosome names and for
> some of my applications, the field containing the chromosome names exceeds
> that limit.
Comment 4 Brian Ripley 2013-07-12 14:25:04 UTC
I don't believe it did 'crash': it gave an informative error message, which you did not show.  I have corrected the mendacious subject line.

It was fairly easy to remove this limit, so I have done so in R-devel.