From egoldlust at gmail.com  Fri Feb 19 17:40:10 2010
From: egoldlust at gmail.com (egoldlust at gmail.com)
Date: Fri, 19 Feb 2010 17:40:10 +0100 (CET)
Subject: [Rd] read.csv('/dev/stdin') fails (PR#14218)
Message-ID: <20100219164010.B708B282EF51@mail.pubhealth.ku.dk>

Full_Name: Eric Goldlust
Version: 2.10.1 (2009-12-14) x86_64-unknown-linux-gnu 
OS: Linux 2.6.9-67.0.1.ELsmp x86_64
Submission from: (NULL) (64.22.160.1)


After upgrading to from 2.9.1 to 2.10.1, I get unexpected results when calling
read.csv('/dev/stdin').  These problems go away when I call read.csv(pipe('cat
/dev/stdin')).

Shell session follows (bash):

~$ echo -e "a,b,c\n1,2,3" | Rscript <(echo "read.csv('/dev/stdin')")
Error in read.table(file = file, header = header, sep = sep, quote = quote,  : 
  no lines available in input
Calls: read.csv -> read.table
Execution halted
~$ echo -e "a,b,c\n1,2,3" | Rscript <(echo "read.csv(pipe('cat /dev/stdin'))")
  a b c
1 1 2 3

Note that this code worked fine for me in 2.9.1.



[Rd] read.csv('/dev/stdin') fails (PR#14218)
egoldlust at gmail.com