Operating System: Windows 10 Enterprise
Interface Version: rstan 2.18.1
Compiler/Toolkit: I’m not sure what to write. I’m using “stan” function in R, and “options(error=recover)” is used to debug the error.
The following error comes when using “stan” function.
A strange thing: When I enter “2” to debug my own “FUN” function where “stan” is called in every iteration, and manually run the sentence of “stan” again, it works. Then, when I click “stop” (equivalently, enter “Q” into console and run), the iteration continues. What is the problem?
Thank you.
Error in envRefInferField(x, what, getClass(class(x)), selfEnv) :
no slot of name “fieldPrototypes” for this object of class “classRepresentation”
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Enter a frame number, or 0 to exit
1: lapply(X = GMM.inner.parallel, FUN = MCMC.GMM)
2: FUN(X[[i]], …)
3: #485: stan(file = “GMM.stan”, data = list(V = length(x.prewhiten), C = Ck.mid, s = x.prewhiten, z = z.mid, alpha_w = delta.w,
4: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, check_data = TRUE, sample_file = sample_file, diagnostic_fil
5: sampling(sm, data, pars, chains, iter, warmup, thin, seed, init, check_data = TRUE, sample_file = sample_file, diagnostic_fil
6: .local(object, …)
7: object@mk_cppmodule(object)
8: eval(call(“$”, mod, paste(“stan_fit4”, model_cppname, sep = “”)))
9: eval(call(“$”, mod, paste(“stan_fit4”, model_cppname, sep = “”)))
10: new(“Module”, .xData = <environment>)$stan_fit4model7407add3a39_GMM
11: .getModulePointer(x)
12: Module(module, mustStart = TRUE)
13: methods::setRefClass(clname, fields = fields, contains = “C++Object”, methods = methods, where = where)
14: setClass(Class, contains = superClasses, where = where, …)
15: is(try(setIs(Class, class2, classDef = classDef, where = where)), “try-error”)
16: try(setIs(Class, class2, classDef = classDef, where = where))
17: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1]],
18: tryCatchList(expr, classes, parentenv, handlers)
19: tryCatchOne(expr, names, parentenv, handlers[[1]])
20: doTryCatch(return(expr), name, parentenv, handler)
21: setIs(Class, class2, classDef = classDef, where = where)
22: completeSubclasses(classDef2, class1, obj, where)
23: .transitiveExtends(class2, classDef@className, extensionDef, classDef@contains, strictBy)
24: .combineExtends(byExt, toExt, by, to, strictBy)
25: (function (cl, name, valueClass)
{
ClassDef <- getClass(cl)
slotClass <- ClassDef@slots[[name]]
if (is.null(slot
26: getClass(cl)
27: (function (x)
x$.self$finalize())(<environment>)
28: x$.self$finalize
29: envRefInferField(x, what, getClass(class(x)), selfEnv)