Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Error in setwd(dir) : cannot change working directory in Rstudio

Hi, I´m just learning R in coursera using swirl. I´ve installed plotly in R studio, but I can´t enter any plot_ly() command without getting this: Error in setwd(dir) : cannot change working directory. I´ve searched this with google and found some cases but without a solution. I´ve tryed changing the working directory, but the error is still happening.
Here it is some sample:

getwd()
[1] "C:/Users/Enrique/Documents"
setwd(“C:/Users/Enrique/Documents/plotly_data”)
getwd()
[1] "C:/Users/Enrique/Documents/plotly_data"
p <- ggplot2::diamonds %>% count(cut, clarity) %>%

  • plot_ly(x = ~cut, y = ~n, color = ~clarity)
    

p
Error in setwd(dir) : cannot change working directory
getwd()
[1] “C:/Users/Enrique/Documents/plotly_data”

I even tryed changing each of this parameters to TRUE:

dir(path = “.”, pattern = NULL, all.files = FALSE,
full.names = FALSE, recursive = FALSE,
ignore.case = FALSE, include.dirs = FALSE, no… = FALSE)

Any help?

Thanks in advance.
Best Regards