[Rd] read.csv('/dev/stdin') fails (PR#14218)
egoldlust at gmail.com
egoldlust at gmail.com
Fri Feb 19 17:40:10 CET 2010
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.
More information about the R-devel
mailing list