import .csv into R (import data set is not accessing local drive)

I want to import external .csv file in the R Studio, but when I go through the File and import data set, it is not browsing desktop where I have installed required .csv files. Pls suggest where I am going wrong.

Where is it browsing?

What operating system?

Or try something like

mydata  <-   read.csv("my.csv.file"

where ""my.csv.file" is the file path and file name.

For example in Linux

mydata  <-    read.csv("~/RJunk/unpop.csv")

I'm guessing you are talking about RStudio Cloud or RStudio Server and not RStudio Desktop, if that is the case, your file doesn't exist in the server where RStudio is running so you need to upload the file first, you can do it with the "upload" button in the "Files" pane.


Hi, how to save Rmarkdown html file, it is showing below error

Error in yaml::yaml.load(..., eval.expr = TRUE) :
Scanner error: mapping values are not allowed in this context at line 4, column 22
Calls: ... parse_yaml_front_matter -> yaml_load ->
Execution halted

This is a different question apparently related to the format of your yaml header, please ask it on a new topic providing a REPRoducible EXample (reprex) to illustrate your issue.

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.