As far as I can see, the following dependencies are either not used (which is bad) or used but without ::, which is should be avoided. Using dependencies without :: is bad practice since it makes the code very hard to read and verify. For instance, it is tedious for me to find if you have actually used your stated dependencies or not.
urca: library(urca) is used in the example of LKSN_test but not used.
fracdiff: library(fracdiff) is used only in examples but never referenced by fracdiff::
LongMemoryTS: library(LongMemoryTS) is used only in examples but never referenced by LongMemoryTS::
sandwich: Not used at all, either with library or sandwich::.
strucchange: Not used at all, either with library or strucchange::.
longmemo: Only used in examples.
stats: Not used at all, either with library or stats::.
All of this is probably caused by the add_to_Namespace.R file containing lots of imports. I strongly suggest that you remove this file and add the dependencies explicitly. On removing add_to_Namespace.R, reoxygenizing and running R CMD check I get the following complaints:
BP_estim: no visible global function definition for 'lm'
BP_estim: no visible global function definition for 'fdGPH'
BP_estim: no visible global function definition for 'ELW'
BT: no visible global function definition for 'lm'
CUSUMLM: no visible global function definition for 'G.hat'
CUSUM_simple: no visible global function definition for 'diffseries'
CUSUM_simple: no visible global function definition for 'gefp'
CUSUM_simple: no visible binding for global variable 'lm'
CUSUM_simple: no visible binding for global variable 'kernHAC'
CUSUM_simple: no visible global function definition for 'sctest'
CUSUMfixed: no visible global function definition for 'lm'
CUSUMfixed: no visible global function definition for 'per'
CV: no visible global function definition for 'coef'
CV: no visible global function definition for 'lm'
CV: no visible global function definition for 'rnorm'
CV: no visible global function definition for 'quantile'
CV: no visible global function definition for 'FI.sim'
HLT: no visible global function definition for 'lm'
HLT: no visible global function definition for 'vcov'
HLT: no visible global function definition for 'coef'
HLTmin: no visible global function definition for 'lm'
HLTmin: no visible global function definition for 'vcov'
HLTmin: no visible global function definition for 'coef'
LBI: no visible global function definition for 'lm'
LKSN: no visible global function definition for 'ur.ers'
LT: no visible global function definition for 'lm'
MR: no visible global function definition for 'fdGPH'
MR: no visible global function definition for 'coef'
MR: no visible global function definition for 'fracdiff'
MR: no visible global function definition for 'fdiff'
MR: no visible global function definition for 'residuals'
MR: no visible global function definition for 'lm'
MR: no visible global function definition for 'arima'
MR: no visible global function definition for 'embed'
MR: no visible global function definition for 'vcovHC'
MR: no visible global function definition for 'vcov'
cusum: no visible global function definition for 'lm'
cusum_test: no visible global function definition for 'fdGPH'
fixbsupw: no visible global function definition for 'lm'
pb_sim: no visible global function definition for 'FI.sim'
wald_test: no visible global function definition for 'pchisq'
Undefined global functions or variables:
ELW FI.sim G.hat arima coef diffseries embed fdGPH fdiff fracdiff
gefp kernHAC lm pchisq per quantile residuals rnorm sctest ur.ers
vcov vcovHC
Please add the correct lib:: prefix to all of these R CMD checkcomplaints.
As far as I can see, the following dependencies are either not used (which is bad) or used but without
::
, which is should be avoided. Using dependencies without::
is bad practice since it makes the code very hard to read and verify. For instance, it is tedious for me to find if you have actually used your stated dependencies or not.library(urca)
is used in the example ofLKSN_test
but not used.library(fracdiff)
is used only in examples but never referenced byfracdiff::
library(LongMemoryTS)
is used only in examples but never referenced byLongMemoryTS::
library
orsandwich::
.library
orstrucchange::
.library
orstats::
.All of this is probably caused by the
add_to_Namespace.R
file containing lots of imports. I strongly suggest that you remove this file and add the dependencies explicitly. On removingadd_to_Namespace.R
, reoxygenizing and runningR CMD check
I get the following complaints:Please add the correct
lib::
prefix to all of theseR CMD check
complaints.This was also mentioned at https://github.com/KaiWenger/memochange/issues/1