thibautjombart / apex

Phylogenetic Methods for Multiple Gene Data
5 stars 3 forks source link

Naming convention #7

Closed KlausVigo closed 9 years ago

KlausVigo commented 9 years ago

I am writing some functions to convert different objects, similar to multidna2genind e.g. multiphyDat2genind, multidna2multiphyDat, multiphyDat2multidna Should I name these multidna2multiphyDat(x) or use a as("multiphyDat", x) And is it better to rename than the multidna2genind.Rd file to exports.Rd?

thibautjombart commented 9 years ago

I would go for xxx2yyy by default, as it is easier and more intuitive. Otherwise one could define the method as(....) using setAs, and then make a wrapper xxx2yyy which calls upon it. But it's pretty much a matter of taste as far as I'm concerned.

On Thu, Mar 26, 2015 at 4:54 PM, klash notifications@github.com wrote:

I am writing some functions to convert different objects, similar to multidna2genind e.g. multiphyDat2genind, multidna2multiphyDat, multiphyDat2multidna Should I name these multidna2multiphyDat(x) or use a as("multiphyDat", x) And is it better to rename than the multidna2genind.Rd file to exports.Rd?

— Reply to this email directly or view it on GitHub https://github.com/thibautjombart/apex/issues/7.