TheoreticalEcosystemEcology / alien

Predict All Links In Ecological Networks
MIT License
12 stars 0 forks source link

explicit name space or @import #7

Closed KevCaz closed 7 years ago

KevCaz commented 7 years ago

When calling a function from another package in one of our own function, should we:

1- use explicit spacename, e.g reshape2::acast 2- using @importFrom reshape2 acastwhen documenting the function (using Roxygen) 3- or both?

Whatever our choice, I think it should be consistent throughout the code.

bw4sz commented 7 years ago

A bit old, but the roxygen2 package developer suggests the first option. Is this still true?

see here

KevCaz commented 7 years ago

I agree we should use the first one as recommended by Hadley Wickham who also suggests the use of @importFrom (or other kind of import) in particular case such as S3 object / methods / pipes (%>%).

SteveViss commented 7 years ago

Works for me!