Help! All desktop files disappeared after using RStudio

Please know I do not know much about R. But I was in R Studio yesterday and was trying to set a new working directory for a class assignment. I had previously had a working directory trying to learn R in Swirl.

I looked up many different ways to reset the set(wd) and tried a bunch of them. None of them worked (i.e. I probably did it wrong) and when I clicked out of RStudio, all of my desktop folders and files were completely gone. And they weren't in the trash either!

Does anyone know what happened or how I could get my files back? I don't have a backup and nothing is in icloud. But I don't understand how I could delete my entire desktop through RStudio.

Rstudio provides a file explorer view (typically on the bottom right)
This is like browsing your computer through the operating system explorer, and allows you to make and remove folders, and copy/move/delete files also.
handle with care... :warning:
unfortunately its probably bad news if you had data there and deleted it in this way, if you don't have backups :frowning:

Hi nirgrahamuk, thank you so much for your reply. You explained it in a way I can understand. I would have never guessed that it would be possible to delete my desktop through Rstudio.

Although I don't understand why it wouldn't appear in the trash, you know? I would have figured it wouldn't be one button and it's all over.

Hi again,
I just tested deleting a file in this way, and I did see it go into my recycling bin.
Does your bin have many items (maybe the ones you deleted recently just need to be found in there)
or is the bin empty ?

Hi nirgrahamuk,

WOW- I think they actually might be in the trash. Oddly, when I looked before, nothing appears in documents, desktop, or downloads. But if I look up a specific word that I remember I named an old document, it appears.

It seems I can only find the files if I search for them directly? The only problem is, I can't remember everything I had on my desktop. Do you know if there is a better way to retrieve everthing?

if they are the last thing you deleted you should be able to sort them to the top

For whatever reason, I can't sort them. If I try sorting, it only shows the few files I've downloaded today. It seems to me the only way to find stuff is searching directly... but I'm not good with technology so I'm not sure