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@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.


______________________________________________
R-help@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.

Reply via email to