[R] littler+dget+stdin -> segmentation fault

John Lawrence Aspden news at aspden.com
Thu Jan 4 20:45:36 CET 2007


Hi, I'm trying to write a series of pipes using littler, and I get the
following behaviour: Sorry if I'm just doing something witless, I'm new to
R. I'm using the latest versions from debian testing (2.4.0 and 0.0.8).


$ r -e 'a<-dget(file=stdin()); print(a)'
?list(a=2)
Segmentation fault

In R itself this works:

> dget(file=stdin())
?list(a=2)
$a
[1] 2

As do (from the command line):

$ cat >foo
list(a=2)
$ r -e 'a<-dget(file="foo"); print(a)'
$a
[1] 2

and (using littler and scan instead of dget)

$ r -e 'a<-scan(file=stdin()); print(a)'

Thanks in advance,

John.

-- 
Contractor in Cambridge UK -- http://www.aspden.com



More information about the R-help mailing list