statdivlab / corncob

Count Regression for Correlated Observations with the Beta-binomial
102 stars 22 forks source link

Replace package `optimr` which has been removed from CRAN with `optimx` #159

Closed svteichman closed 10 months ago

svteichman commented 10 months ago

Removing dependence on optimr which has been removed from CRAN. Replace with optimx as a suggested package (both packages have an optimr() function, which extends the functionality of optim). The package will use optimx if it is available, if not it will look for optimr (in case a user has a previous version and doesn't want to download a new package), and if neither are there it will throw an error suggesting that the user install optimx. This causes a note, because optimr is used but not included in the imports/depends/suggests because it is not currently an available package. This behavior is tested in one of the tests within "test_bbdml.R", which is currently passing but will fail if bbdml() fails when optimx or optimr is loaded, or when neither package is loaded but an error is not thrown.

Additionally, this pull request makes a few small changes in the vignette, including removing a static rendering of the vignette (to be displayed in a github.io site eventually) and adding a warning for the function contrastsTest() based on a problem described in Issue #160.