0

We just got new computers at work, it's been a blessing and a curse.

I tried creating a reprex and I'm getting an error I haven't seen before:

reprex::reprex(cat("hello"))
# Error in file(con, "w") : cannot open the connection
# In addition: Warning message:
# In file(con, "w") : cannot open file 'C:/Users/oliver.R': Permission denied

I don't know what's going on here, except my user name isn't oliver.R, it's oliver.lastname. So somehow it's appending "R" to part of my Windows user name?

traceback() gives me

traceback()
# 3: file(con, "w")
# 2: writeLines(src, r_file)
# 1: reprex::reprex(cat("hello"))

I can write in my working directory, which isn't the non-existent file path shown above.

Oliver
  • 1,098
  • 1
  • 11
  • 16
  • 1
    This sounds like your default R user directory has changed, and also the file permissions within that directory have changed. Maybe ask your network admin about this, if he's available. – Tim Biegeleisen Feb 04 '19 at 13:21
  • 2
    Change your working directory to one where you have permission to write. e.g. `setwd("~")` – G. Grothendieck Feb 04 '19 at 13:25

0 Answers0