2

我一直在尝试cranvas帮助文件中的一些示例,并在运行它们时遇到以下错误:

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”

这是我的会议:

> 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 

提前致谢

4

1 回答 1

1

我不知道。我使用具有类似软件包版本的 R-2.15.2 进行了测试,这很有效。可能是 qt 库,但我只是猜测。它也可能与 R 的较新版本有关,因为进行了更改。我建议检查 qt 的东西是否正常工作,因为第一个错误是在实际渲染绘图时出现的,尽管该错误并没有真正表明这将是原因。

于 2013-05-23T00:31:39.473 回答