find wd in R studio when using a Mac desktop

I am having a problem after I upload a CSV file into R Studio. After it is uploaded I don't know how to access that file.
I have tried the following
getwd()
setwd(c:/Users?Louissoto/Downloads")
dat<-read.csv("../../Downloads/Hospital.csv")

Hi!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:


For example, I see what you tried, but what happened when you tried this? Any error message?

Also, you mention you "uploaded" into RStudio. Are you using the RStudio IDE on your desktop (no upload needed), or RStudio Server or RStudio.cloud (where upload is needed)?

A few tips here:

Hi there,
Can you tell us more about what you are trying to do? If your read.csv() command worked correctly, then you succeeded in assigning Hospital.csv to the object "dat". Have you tried typing "dat" or "head(dat)" or "str(dat)" to look at the contents of the object?

I might be misunderstanding your question--are you having trouble actually getting the read.csv() command working? In that case it might be a working directory/path issue. But you'll need to give us a little more info before we can help you solve this.

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.