jsocolar / flocker

flexible occupancy estimation in R
Other
26 stars 2 forks source link

Error: could not find function "loo_flock_onefit" #44

Closed abfleishman closed 2 years ago

abfleishman commented 2 years ago

This makes no sense to me. I see that the roxygen2 does not export loo_flock_onefit but because it is being used internally, it should not matter.

mod_loo<-loo_compare_flocker(list(mod_null, mod, mod1))

Error in loo_flock_onefit(x[[i]]) : could not find function "loo_flock_onefit"

mod_loo<-loo_flocker(mod_null)

Error in loo_flock_onefit(x) : could not find function "loo_flock_onefit"

If I use the ::: notation I can print out the function so it clearly exists!

flocker:::loo_flocker_onefit

function (x) { type <- type_flocker_fit(x) if (type == "C") { } else if (type == "V") { chain_id <- rep(c(1:dim(x$fit)[2]), each = dim(x$fit)[1]) ll <- log_lik_V(x) out <- loo::loo(ll, r_eff = loo::relative_eff(ll, chain_id = chain_id)) } return(out) } <bytecode: 0x000001fa0d95aa18>

abfleishman commented 2 years ago

Oh! There is a name issue! It is calling loo_flock_onefit and it needs to be changed to loo_flocker_onefit!

jsocolar commented 2 years ago

Closed via #45