[R-pkg-devel] NOTE for a suggested package

Mohammad Ali Nilforooshan m@@@n|||oroo@h@n @end|ng |rom gm@||@com
Sun Feb 24 00:43:15 CET 2019


I'm struggling to stop receiving a NOTE about a suggested package, and it
seems to be the problem for many people. Your help is really appreciated.

In the function, I have:

if(requireNamespace("doParallel", quietly=TRUE))
{
   library("doParallel")
   cl = parallel::makeCluster(ncl)
   doParallel::registerDoParallel(cl)
   Q = foreach(i=ggID, .combine='cbind') %dopar% ## do something
} else {
   ## do something else
}

In DESCRIPTION, I have:

Suggests:
   doParallel (>= 1.0.14)

This is the NOTE that I receive:

'library' or 'require' call to 'doParallel' in package code.
Please use :: or requireNamespace() instead.
See section 'Suggested packages' in the 'Writing R Extensions' manual.

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list