2

I've been trying some examples from the cranvas help files and got the following errors while running them:

library(cranvas)

## example 1: NASA temperature data
nasa2221 <- subset(nasa, Gridx == 22 & Gridy == 21)
nasa2221$Year <- factor(nasa2221$Year)
qnasa <- qdata(nasa2221)
qnasa1 <- time_qdata(qnasa, "ts")
qnasa2 <- time_qdata(qnasa, c("ts", "ps_tovs", "ca_med"))

> qtime(TimeIndx, qnasa1, shift = c(1, 12))
Error in envRefSetField(x, what, refObjectClass(x), selfEnv, value) : 
  ‘singleVarLen’ is not a field in class “Time_meta”
> qscatter(data = qnasa, ts, ps_tovs)
> 
> qtime(TimeIndx, qnasa1, Year, shift = 1)
Error in envRefSetField(x, what, refObjectClass(x), selfEnv, value) : 
  ‘singleVarLen’ is not a field in class “Time_meta”
> qtime(TimeIndx, qnasa2, shift = c(1, 12))
Error in envRefSetField(x, what, refObjectClass(x), selfEnv, value) : 
  ‘singleVarLen’ is not a field in class “Time_meta”
> qtime(TimeIndx, qnasa2, Year)
Error in envRefSetField(x, what, refObjectClass(x), selfEnv, value) : 
  ‘singleVarLen’ is not a field in class “Time_meta”

this is my session:

> sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.UTF-8          LC_NUMERIC=C                  LC_TIME=en_GB.UTF-8          
 [4] LC_COLLATE=en_GB.UTF-8        LC_MONETARY=en_GB.UTF-8       LC_MESSAGES=en_GB.UTF-8      
 [7] LC_PAPER=C                    LC_NAME=en_GB.UTF-8           LC_ADDRESS=en_GB.UTF-8       
[10] LC_TELEPHONE=en_GB.UTF-8      LC_MEASUREMENT=en_GB.UTF-8    LC_IDENTIFICATION=en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] cranvas_0.8.3     gWidgets2Qt_1.0-1 gWidgets2_1.0-1   digest_0.6.3      qtutils_0.1-3    
[6] qtbase_1.0.6      devtools_1.2     

loaded via a namespace (and not attached):
 [1] colorspace_1.2-2       dichromat_2.0-0        evaluate_0.4.3         httr_0.2              
 [5] labeling_0.1           memoise_0.1            munsell_0.4            objectProperties_0.6.5
 [9] objectSignals_0.10.2   parallel_3.0.1         plumbr_0.6.6           plyr_1.8              
[13] qtpaint_0.9.0          RColorBrewer_1.0-5     RCurl_1.95-4.1         scales_0.2.3          
[17] SearchTrees_0.5.2      stringr_0.6.2          tools_3.0.1            whisker_0.3-2 

Thanks in advance

Michele
  • 8,563
  • 6
  • 45
  • 72
  • 1
    I'm really curious to know the reason for the downvote...in case he/she is able. the question is asked correctly and gives enough info to be answered I think!!! – Michele May 22 '13 at 22:54

1 Answers1

1

I don't know. I tested with R-2.15.2 with similar package versions and this worked. It might be the qt libraries, but I'm just guessing. It might also be related to the newer version of R, as changes were made. I'd suggest checking if the qt stuff is working, as the first error comes when a plot is actually rendered, though the error doesn't really suggest this will be the cause.

jverzani
  • 5,600
  • 2
  • 21
  • 17
  • compilation of the packages went well so I thought of Qt too. I used this link to install Qt library, https://github.com/ggobi/cranvas/wiki/Installation-under-ubuntu. – Michele May 23 '13 at 06:30
  • @Michele That error seems to come from reference classes; we'll check it. Thanks for the report. – Yihui Xie Jun 12 '13 at 20:22