[R] error using scan

Eik Vettorazzi E.Vettorazzi at uke.uni-hamburg.de
Sun Feb 22 13:46:28 CET 2009


Hi Sharai,
I think scan() needs the extension as well. Have you tried

scan("C:/prueba.txt")

(this assumes that prueba.txt resides in your c-root dir)
hth.

Sharai Gomez schrieb:
> Hi,
> I hope you are fine. I am trying to use scan to open a file "prueba"
> extension txt. I am using the scan command as
>
> scan("C:/prueba")
> and I get the following error:
>
> Error in file(file, "r") : cannot open the connection
> In addition: Warning message:
> In file(file, "r") : cannot open file 'prueba': No such file or directory
> I did the following, however I can not fix it. I really appreciate any help.
> Thank you.
>
>   
>> list.files()
>>     
> [1] "desktop.ini"  "Mi música"    "Mis imágenes" "Mis vídeos"
> "R"
>  stdin()
> description       class        mode        text      opened    can read
> can write
>     "stdin"  "terminal"         "r"      "text"    "opened"
> "yes"        "no"
>  getwd()
> [1] "C:/Users/Sharai Gomez Raygoza/Documents"
>
> 	[[alternative HTML version deleted]]
>
>   
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list