This works just fine:
FuncData<-setRefClass("FuncData", fields = c("Data"))
DF <- FuncData$new(Data = 4)
I rename "FuncData" to "FunData":
FunData<-setRefClass("FunData", fields = c("Data"))
DF <- FunData$new(Data = 4)
And get an error:
Error in initialize(value, ...) :
invalid name for slot of class “FunData”: Data
Any idea what's happening?
R 3.2.2, RStudio
UPD: after I've got a number of similarly strange errors, I've restarted RStudio and now everything works just fine. The only question left is: what was the problem which was solved by the restart?
One of the "similarly strange errors" were:
nobs(a)
resulting in:
Error in nrow(a): unused argument (a)