[R] A bug in the function "scan"?

Peter Kleiweg kleiweg at let.rug.nl
Mon Dec 25 16:01:39 CET 2000


Dilip N. Thadani skriver...

> I issue the command
>  scan(file="c:/tmp.txt",what="",sep=",")
> Read 3 items
> [1] "ab"      "5"       "bc,cd,5"
> 
> >
> 
> Why is it not reading 5 items?  If i remove the apostrophe in the third item
> (ie. b'c => bc) then scan reads all 5 items as I would expect it.


Use:

    scan(file="t",what="",sep=",",quote="")

Read 5 items
[1] "ab"  "5"   "b'c" "cd"  "5"

-- 
Peter Kleiweg
http://www.let.rug.nl/~kleiweg/

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list