I agree. Looking through the code, the pattern is to call library() rather than require(). I think we should modify the code to be consistent.

I'll make the change in this branch for the GetoptLong package, write a little helper function so we don't have if(!require(..)) stop ("message") all over the place, and open an new issue to update the use of library.

Kenton White

On Dec 17, 2013, at 3:16 AM, Kirill Müller <notifications@github.com> wrote:

> In R/sql.reader.R:
> 
> > @@ -259,6 +265,11 @@ sql.reader <- function(data.file, filename, variable.name)
> >  
> >    if (! is.null(query))
> >    {
> > +		if (length(grep('\\@\\{.*\\}', query)) != 0) {
> > +			# Do string interpolation
> > +			library('GetoptLong')
> If so, shouldn't we rather use if (!require(...)) stop("user-friendly message") here?
> 
> —
> Reply to this email directly or view it on GitHub.
>