drsimonj / twidlr

data.frame-based API for model and predict functions
Other
59 stars 9 forks source link

File naming for duplicated function name across packages #7

Closed joranE closed 7 years ago

joranE commented 7 years ago

What's your plan for file naming when you start hitting functions in different packages with the same name (gam comes to mind)? Maybe the files should be named package-function.R, or would you prefer just package.R and then put all code for functions from that package in that one file?

drsimonj commented 7 years ago

Good question! package.R sounds like a good way to go. Will help to keep the number of files down too. And also nice to keep certain predict methods together. E.g., I just added [predict.merMod](https://github.com/drsimonj/twidlr/blob/master/R/lmer.R#L36) which works for lmer and glmer, but is in the lmer.R file. Would be good to have them all together.

Perhaps even twidlr-package.R to make them distinct from other files (like utilities.R). E.g., twidlr-stats.R, twidlr-quantreg.R, etc.

I'll get started on this soon.