Re: [R-pkg-devel] NOTE for a suggested package
Remove the library function call... On February 23, 2019 3:43:15 PM PST, Mohammad Ali Nilforooshan wrote: >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]] > >__ >R-package-devel@r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Sent from my phone. Please excuse my brevity. __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] NOTE for a suggested package
You can remove the `library("doParallel")`. Your call to requireNamespace() plus calling all doParallel functions with `::` is sufficient. That should resolve the NOTE. On Sat, Feb 23, 2019 at 5:49 PM Mohammad Ali Nilforooshan wrote: > > 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]] > > __ > R-package-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-package-devel -- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com R/Finance 2018 | www.rinfinance.com __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
[R-pkg-devel] NOTE for a suggested package
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]] __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel
Re: [R-pkg-devel] Cran submission - warning with windows (cpp build library gmp)
> Kevin Ushey > on Fri, 22 Feb 2019 10:09:15 -0800 writes: > The 'long long' type does not exist in the C++98 > standard, so you need to explicitly request C++11 or > C++14 (the former which is now fairly broadly supported > across compilers on different systems). > For more detail, see in the R extensions manual: > https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Using-C_002b_002b11-code > Best, Kevin Indeed, thank you, Kevin. In this case, it simply needs an extra line CXX_STD = CXX11 added to gmp/src/Makevars.in (already done now). Martin > On Fri, Feb 22, 2019 at 5:08 AM Antoine Lucas > wrote: >> Dear all >> >> I would like to update gmp package - this package link to >> a c++ library gmp. >> >> But windows c++ compilation warns at: >> d:/Compiler/gcc-4.9.3/local330/include/gmp-x64.h:140:23: >> warning: ISO C++ 1998 does not support 'long long' >> [-Wlong-long] >> >> I have not this warning on linux. On my computer I build >> latest version on gmplib, and header is a little >> different and should not define a long long. I wonder if >> the warning could be fixed by an update of external c++ >> library gmp. >> >> How could I fix my package in order to pass the cran >> submission ? >> >> Regards, >> >> Antoine Lucas >> >> gmp.h at line 140: #ifdef __GMP_SHORT_LIMB typedef >> unsigned int mp_limb_t; typedef int mp_limb_signed_t; >> #else #ifdef _LONG_LONG_LIMB typedef unsigned long long >> int mp_limb_t; typedef long long int mp_limb_signed_t; >> #else typedef unsigned long int mp_limb_t; typedef long >> int mp_limb_signed_t; #endif #endif __ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel