Where is the Rstudio snippet file located on mac?

I try to help a friend (lets call him Fredrik) to find the Rstudio snippet file on a Macintosh system. Despite a) un-hiding hidden files, b) searching the hard drive for file names similar to the snippet file-name on windows, and c) some manual browsing for likely locations, I have not been able to find it. Does somebody know where it is located? (Googling around just gives me information on where to find it on Windows systems.)

The reason I ask is because I find it tedious to access the snippet file through the menu. Therefore, on my own system (running windows) I have made a snippet that opens the file directly from the editor. I would like to provide my friend Fredrik with the same functionality. It is quite neat, IMHO:

snippet sn_edit_snippets    
  `r file.edit("C:/Users/USER_NAME/.R/snippets/r.snippets")`

The snippet file doesn't exist unless you have custom snippets, so it's possible "Fredrik" doesn't have one at all. This article gives the location of the snippets file on various platforms:

1 Like

Great! I read the help file, but did not pay enough attention in the end to see that part. Sorry for that. (Hopefully this question could help some other sloppy readers as well.)

This topic was automatically closed 7 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.