No stanmodels list after loading my package

Hi,

I try to build a package following the instructions given in rstantools.
My package builds and loads, but I have no ‘stanmodels’ list in the environment.
It is created properly if I source ‘R/stanmodels .R’ manually.
Any idea why it is not done automatically ???

Thanks

Depends:
methods,
R (>= 3.4.0),
Rcpp (>= 0.12.19)
Imports:
rstan (>= 2.18.1),
rstantools (>= 1.5.1)
LinkingTo:
BH (>= 1.66.0-1),
Rcpp (>= 0.12.19),
RcppEigen (>= 0.3.3.4.0),
rstan (>= 2.18.1),
StanHeaders (>= 2.18.0)

It’s not usually exported, check your_package_name:::stanmodels if you want to use your precompiled Stan models in an interactive way. I usually write a wrapper for a specific model within the package that lets me use the model in an interactive way, like this:

double_tanh_latent_spline <- function(
  stan_data_list,
  ...
) {
  model_fit <- rstan::sampling(stanmodels$spline_density_profile, 
                               data = stan_data_list, ...)
  return(model_fit)
}```