The delete function in the RStudio IDE just performs a standard Linux rm, so recovering a single file is as easy or hard as it would be if someone were to perform a rm file on the command line. I'd recommend trying that yourself (with an unnecessary test file, naturally
) and check and see if you're able to recover a single file from your backups.
Otherwise...we've suggested utilities like PhotoRec (https://www.cgsecurity.org/wiki/PhotoRec) in the past for users who've accidentally deleted files they needed to recover. You have to run it as soon as possible though, and ideally with no one else using the server to write files to disk, to try and make sure the data you're trying to recover doesn't get overwritten.
In general I'd say best practices are backup, backup, backup, and make sure you're prepared to recover from those backups!