parksw3 / epidist-paper

Other
10 stars 4 forks source link

DT is not installed from data.table #31

Closed kcharniga closed 1 year ago

kcharniga commented 1 year ago

Using the following code, one of the functions from data.table (DT) is not being installed, and therefore the vignette does not run:

library(devtools) install_github("parksw3/dynamicaltruncation")

When running this line:

secondary_dist <- data.table( meanlog = 1.8, sdlog = 0.5) |> add_natural_scale_mean_sd()

the error is:

Error: 'DT' is not an exported object from 'namespace:data.table'

parksw3 commented 1 year ago

You have to run data.table::update_dev_pkg() to install the latest version.

seabbs commented 1 year ago

Thanks for flagging this @kcharniga. As @parksw3 says we are depending on the development version of data.table but not making that very clear. I think the more stable way to get users to install this is likely by using the GitHub repository (as we can specify this in the DESCRIPTION vs requiring users to run another function). Will close this once this is updated and checked.

seabbs commented 1 year ago

Added the development version of data.table from GitHub to the REMOTES section of the DESCRIPTION. Note this means that this version is transcient and data.table could in theory introduce breaking changes. As a package though it tends to be fairly stable so this is unlikely and once they release their latest version we can update to depend on the CRAN version (and going forward in any "production" ready version of this package.

See: 4ba6e2036d6b2ba4136af61286a1cf62269cf8cf