KaiWenger / memochange

An R package for identifying structural changes in time series.
GNU General Public License v2.0
4 stars 6 forks source link

JOSS Review: Remove superfluous references #4

Closed JonasMoss closed 5 years ago

JonasMoss commented 5 years ago

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.

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.

This was also mentioned at https://github.com/KaiWenger/memochange/issues/1

KaiWenger commented 5 years ago

Hi @JonasMoss, regarding this issue:

JonasMoss commented 5 years ago

Great! Thanks!