1
我已將R中的採樣算法轉換爲Rcpp。該RCPP代碼被編譯,但是給調用來自R Error in eval(expr, envir, enclos)
功能時出現錯誤:首頁出界」回溯()也沒有翔實在Rcpp中調試運行時錯誤
7: stop(list(message = "index out of bounds", call = eval(expr,
envir, enclos), cppstack = NULL))
6: .Call("temp1_eeSNP_regress", PACKAGE = "temp1", x, y, feature,
alpHa, gamMa_prob, beTa, estimate_alpha, estimate_beta, B_inv_alpHa,
itermax, thin, burnIn)
5: eeSNP_regress(x = e.obj$x, y = e.obj$y, feature = e.obj$feature,
alpHa = e.obj$alpHa, beTa = e.obj$beTa, gamMa_prob = e.obj$gamMa.prob,
estimate_alpha = F, estimate_beta = T, B_inv_alpHa = rep(1/100,
dim(e.obj$feature)[2] + 1), itermax = 5000, thin = 40,
burnIn = 1000) at cmd.R#1
4: eval(expr, envir, enclos)
3: eval(ei, envir)
2: withVisible(eval(ei, envir))
有沒有辦法來調試RCPP這樣的運行時錯誤而不是拋出一堆COUT的?是否有可能調用在'r GDB?