Latest RStudio not showing R scripts and deleteing files...

Hi All,
After installing the latest version of RStudio our users are reporting scripts not being visible and files being deleted or empty after using the product. I did find a issue logged against an earlier version of RStudio where we had to change the encoding in the RStudio configuration to utf-8. But I am concerned about R users reporting the deletion of files. Is that what happens if a user loads a script it is not visible in RStudio then saves the script?

Thanks!

How is a file that's not visible to RStudio being loaded in the first place? Has the user RStudio is running as changed between installations? Have you taken a look a the permissions on the files that are not visible to RStudio?

What OS is this about?

The file is visible from a name perspective when you want to open it. But once opened the console area is blank. I have seen this happen myself.
The OS is windows 10 professional.

Thanks!

My recollection of Windows permissions is that there is a different permissions for list files, read, and write. Check that RStudio has read permission on the files that appear empty.

RStudio might have list and write permission to the directory, but not read permission for the file. File is visible in a file browser dialog but appears blank as RStudio doesn't have read permission. When saving, it overwrites the file because it has write permission for the directory.

Then why does setting global config settings for utf-8 solve the visibility problem? Why does not RStudio provide a warning that the file is read only? Finally ,we have no issues with the R engine reading or writing so if file permission issues why does that work?

Thanks

You were able to solve the issue by changing the global config for encoding to utf-8? I was under the impression that solved the issue for a previous version.

Without access to your system, I can only guess at what the permissions look like. The file would not be read-only. RStudio would not have read permissions for the file. If it has write permissions for the directory, then it can overwrite the file, even though it can't read the original.

I suggest checking that RStudio has read permission for a file that appears empty, but that is known not to be and still shows up in the open files dialog.

Do you meaning running R directly from a WSL terminal or powershell?

You might try running file.access(c("path_to_file.R"), mode=4) in your R console. However, "Permission will be computed for real user ID and real group ID (rather than the effective IDs)." and I have no idea how that translates to Window's user model.

The users are probably running from a WSL terminal or tools supplied with the standard R install.

The users will be running tests now on RStudio before they use it any more.

I will check the settings when we start formal acceptance testing for RStudio.

Thanks!

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.