错误没有贴全,不知道是啥问题
> zao<-read.table("x:/Yaping.Ma/zao.txt",header=TRUE,sep="\t")
> head(zao)
Date x1 x2 x3 x4 x5 x6 x7 x8
1 12-Jul 30.06 11.66 2.02 9.68 4.06 21.41 3.55 0
2 12-Jul 32.18 13.42 2.29 7.96 5.42 22.85 2.59 0
3 12-Jul 28.31 11.56 1.95 7.78 4.07 16.36 3.42 0
4 12-Jul 28.63 11.98 1.99 7.42 4.60 16.01 2.79 0
5 12-Jul 27.42 11.58 1.83 7.30 3.26 18.97 5.07 0
6 12-Jul 24.75 10.25 1.24 6.21 3.10 17.70 4.06 0
> zao.pca<-prcomp(zao[,-1],scale. = TRUE)
> groups<-factor(zao[,1])
> summary(zao.pca)
Importance of components:
PC1 PC2 PC3 PC4 PC5
Standard deviation 2.1586 1.2076 0.9174 0.75944 0.52738
Proportion of Variance 0.5824 0.1823 0.1052 0.07209 0.03477
Cumulative Proportion 0.5824 0.7647 0.8699 0.94204 0.97680
PC6 PC7 PC8
Standard deviation 0.36470 0.22931 0.0005306
Proportion of Variance 0.01663 0.00657 0.0000000
Cumulative Proportion 0.99343 1.00000 1.0000000
> pca3d(pca,
components = 1:3, col = NULL, title = NULL, new = FALSE,
axes.color = "grey", bg = "white",
radius = 1, group = NULL,
shape = NULL, palette = NULL, fancy = FALSE,
biplot = FALSE,
biplot.vars = 5, legend = NULL, show.scale = FALSE,
show.labels = FALSE, labels.col = "black",
show.axes = TRUE,
show.axe.titles = TRUE, axe.titles = NULL,
show.plane = TRUE,
show.shadows = FALSE, show.centroids = FALSE,
show.group.labels = FALSE,
show.shapes = TRUE, show.ellipses = FALSE,
ellipse.ci = 0.95)
Error in names(group.val) <- levels(group) :
attempt to set an attribute on NULL
在这总出现这个错误提示,那位大神可以帮忙看看啊,急急!感激不尽