setwd("D:/RDATA")
data<-read.csv(file = "stposts.csv",header = T,seq=",")
data_temp<-read.csv(file = "stposts.csv",header = F,stringsAsFactors = F)
data
colnames(data)<-data_temp[1,]
pr<-prcomp(data[,2:3202],scale=T)
summary(pr)
temp1<-as.data.frame(predict(pr))
score<-data.frame(rootstock=data$rootstock,vintage=data$vintage,pc1=temp1$pc1,pc2=temp1$pc2)
score$vintage<-as.factor(score$vintage)
library(ggplot2)
p_score<-ggplot(score,aes(x=PC1,y=PC2,shape=vintage,colour=vintage))+
geom_point(size=3)+
stat_ellipse(aes(colour=vintage,fill=vintage),alpha=.3,geom="polygon")+
xlim(-8,8)+
geom_vline(xintercept=0,linetype="dashed")+
geom_hline(yintercept=0,linetype="dashed")+
geom_text(aes(label=rootstock),vjust=0.1,hjust=-.1,alpha=1)+
xlab("PC1 (60.92%)")+ylab("PC2 (10.88%)")+
labs(title="PCA Scores Plot",hjust=0.5)+
theme1
Error: object 'theme1' not found
各位大佬,请问theme1不是ggplot2预设好的吗》?为啥not found啊