rcppbugs icon indicating copy to clipboard operation
rcppbugs copied to clipboard

object of type 'bytecode' is not subsettable

Open stla opened this issue 11 years ago • 6 comments

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>

stla avatar Feb 19 '14 14:02 stla

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?

armstrtw avatar Feb 19 '14 14:02 armstrtw

Thank you for your attention. I'm using R-3.0.2. Actually my session in RStudio was completely bugged after this episode.

stla avatar Feb 19 '14 14:02 stla

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.

armstrtw avatar Feb 19 '14 14:02 armstrtw

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).

stla avatar Feb 19 '14 15:02 stla

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...

armstrtw avatar Feb 19 '14 15:02 armstrtw

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

stla avatar Feb 19 '14 16:02 stla