R Packages - What is the file 'zzz.R' used for?
package, r
Solution
It's a file where one usually puts actions on load of the package. It is tradition/convention that it's called zzz.R and could be called anything.R
You only need to include this if you want you package to do something out of the ordinary when it loads. Keep looking at what people put in there and you'll begin to get a sense of what they're used for.
Problem
I'm planning to condense some of my code into a package, and was looking at the source of a few published packages on CRAN as a guide. I notice many packages include the file `R\zzz.R`, so I presume there must be some convention surrounding this. However, I cannot find any mention of `zzz.R` in the official Writing R Extensions guide. What is this file for, and do I need to include one in my package? Why is it named the way it is - why not `zzzz.R`?