Having trouble uploading CSV from an encrypted shared folder I have access to

Hello there,

First time posting here so apologies for errors in post.

My office recently encrypted certain shared folders using McAfee FRP software. When I log on to my computer (which uses Windows 10 Enterprise) I am automatically logged in with an authentication key so that I can access the encrypted folders and files in their folders without a problem. I can open Excel files and I can load in Excel/CSV files into my SAS programs.

However, when I try to load in files using R by setting my work directory and then loading in a csv, I get the following error:

setwd("V:/Education")
test <- read.csv('test.csv')
Error in file(file, "rt") : cannot open the connection 
In addition: Warning message: 
In file(file, "rt") : 
cannot open file 'test.csv': No such file or directory

When I transfer the encrypted file from an encrypted folder to my personal, unencrypted folders, this code works fine (with the appropriate adjustment to the setwd command).

A colleague found a workaround - I can load in the CSV from an encrypted folder if I put in the full path name into my read.csv command.

However, I find it very strange that I can't set up a working directory and import files without having to write the entire path every time. I was wondering if anyone had any experience with this issue or knew more about what's going on 'underneath the hood' that would explain why it happens.

Thank you.

I don't know why you have this issue. However, I wonder why you need to use setwd.

Are you working with a Rstudio project in this "V:/Education" ? Where is your project if not ?

I am just curious.

Putting the all path in read.csv seems a correct solution to me if the file is not part of you project directory.

About your issue, I don't know how R works internally with your OS component to access the encrypted directory.

I use the setwd command a lot. I'm a fairly novice R user so I'm not sure I'm doing things correctly/efficiently but this is why I usually use it:

My R project is in V:/Education but only some of the CSVs I'm working with are. I use setwd because I use CSVs from different folders (not just the one my R project is saved in) and although I can point to the right file by going to session -> set working directory in R studio and then uploading the file, I like keeping a record of where the CSV files I'm working with are located in the code so that a colleague can use my R code as well.

I'll now switch to putting the full path name in the read.csv command. I just still find it so strange that now setwd() doesn't allow me to import a file using just the name even though when I look into the directory with dir() command I see it in there.

I think you could be interested in this blog post: