dynG​​raph包的错误

时间:2012-10-11 10:09:05

标签: r

以下R代码中的acp对象是PCA()来电的输出。你对错误的原因有什么看法吗?

> library(dynGraph)
Loading required package: rJava
> dynGraph(acp)
Error in .jinit(classpath = paste(dir, "dynGraph.jar", sep = "")) :
  Cannot create Java virtual machine (-4)

编辑:以下是产生其他错误的示例:

library(FactoMineR)
library(dynGraph)

D <- scan()
3 -2 -1
2 -1 -3
1 2 -3
-3 1 2
-2 0 3

D <- as.data.frame(matrix(D, byrow=TRUE, ncol=3))
names(D) <- c("x","y","z")
rownames(D) <- LETTERS[1:nrow(D)]

acp <- PCA(D,  
    scale.unit=FALSE,
    ncp=2, graph=FALSE)

dynGraph(acp)

> dynGraph(acp)
Error in .jcall(obj, , "addVal", annot[1, 1], tab) : 
  java.lang.AbstractMethodError: org.apache.xerces.dom.DeferredTextImpl.getTextContent()Ljava/lang/String;

编辑:事实上,当简单输入时,dynGraph与上一个例子配合得很好:

dynGraph(D)

所以我怀疑错误是由于不良做法造成的?

编辑:以下是sessionInfo()输出:

> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: i386-pc-mingw32/i386 (32-bit)

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] dynGraph_1.05        rJava_0.9-3          FactoMineR_1.20      scatterplot3d_0.3-33 cluster_1.14.2      
[6] lattice_0.20-10      ellipse_0.3-7       

loaded via a namespace (and not attached):
[1] grid_2.15.1  tools_2.15.1

0 个答案:

没有答案