Why can't I upload files with Rstudio?

I am a university student who is starting to use Rstudio.
The problem is that when I want to load a file trought read.table (I don't care if it is excel or txt) I get the error that it has not been found.
I have re-downloaded it several times and changed address and name, and it doesn't change.
Do you know what can happen?
Thank you very much

The code:
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'first_trial_deniro.csv': No such file or directory

Welrom to the forum.
Can you give us the actual code you are using to head in the file? Just copy it and paste it between
```

```

Also what are you getting if you run

getwd()
read.table("first_trial_deniro.csv",sep = ",",header = TRUE)
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
  cannot open file 'first_trial_deniro.csv': No such file or directory
 getwd()
[1] "C:/Users/david/OneDrive/Escritorio/Lección R"

Being the direction of setwd ("C:/Users/david/OneDrive/Escritorio/Lección R)

I "think" the problem is the blank space in

Lección R)

If I remember correctly, OneDrive can be very fussy about spaces.

I have never used OneDrive so I am not sure what to suggest. Perhaps if you rename that that folder to something like Lección_R?

Sorry not to be of more help.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.