nickmckay / LiPD-utilities

Input/output and manipulation utilities for LiPD files in Matlab, R and Python
http://nickmckay.github.io/LiPD-utilities/
GNU General Public License v2.0
29 stars 9 forks source link

remove superfluous use of fully qualified function names using 'base::' #19

Closed gavinsimpson closed 7 years ago

gavinsimpson commented 7 years ago

It is odd to use a fully-qualified reference to function in the base namespace base::, especially when this is don't only rarely.

This PR removes the string base:: R from the three .R files where it occurred.

chrismheiser commented 7 years ago

I've included the package name with the function, even in base functions, because it's easier to track which packages functions come from and which functions are my own. It helps me manage the dependencies list.

gavinsimpson commented 7 years ago

@chrismheiser Thanks; doing this consistently for base functions isn't worth the extra pain to read esp as it was used inconsistently (note the list() calls for example in the same lines I altered). Whilst it's not my style, I can understand it for the odd occasion you use a non-base function.

I noticed that other packages get a fully qualified reference, but didn't touch them. I'll note that doing it that way (stringr::foo) is OK from an Imports point of view but it is slower to access functions that way (so if you use them a lot consider explicit imports) and it is harder to keep track of dependencies.