object of type 'bytecode' is not subsettable
Hello,
I have just installed libboost and rcppbugs (CRAN version) on a Ubuntu machine. When running this example I get the following error:
> theta <- deterministic(function(mu,tau,eta) { mu + tau * eta }, mu, tau, eta)
<simpleError in object[seq_len(ile)]: object of type 'bytecode' is not subsettable>
The same error occurs when I run the example provided in the help of the deterministic function:
> y.hat.user <- deterministic(function(X,b) { X %*% b }, X, b)
<simpleError in object[seq_len(ile)]: object of type 'bytecode' is not subsettable>
Thanks. I'll have a look. It's been a while since I've compiled this package, it could be due to a change in R. What R version are you using?
Thank you for your attention. I'm using R-3.0.2. Actually my session in RStudio was completely bugged after this episode.
that happens to us to on Rstudio (not specifically with rcppbugs, but using Rstudio in general).
Anyway, I'll have a look a bit later today.
Right, it works when I run R in a terminal. I have never seen this error message before (by the way typing "object of type bytecode is not subsettable" in Google yields no result).
If it is working in the terminal, then I think it is likely a bug in Rstudio. We have seen this issue before on some other object types that Rstudio does not understand. I think what happens is that Rstudio has some introspection methods which try to update the list of variables in the 'Environment' panel. It tries to show the dimension of the object and a subset of the values, but it will fail if it doesn't understand the object type. that's my guess anyway...
I have (tried to) fill an issue on support.rstudio: https://support.rstudio.com/hc/communities/public/questions/200816597-object-of-type-bytecode-is-not-subsettable