Hi, I got the following error with this command code
PCA<-read.table("plink.eigenvec") attach(PCA) PCA head(PCA) plot(PCA[1:4]) dim(PCA) colnames(PCA)<-c("FID","IID","EV1","EV2") head(PCA) tab1<-data.frame(breeds=PCA$FID,PC1=PCA$EV1,PC2=PCA$EV2,stringsFactors=FALSE) head(tab1)
: col <-c("breed1"="red" ,"breed2"="yellow" ,"breed3"="green" ,"breed4"="orange" ,"breed5"="brown" ,"breed6"="pink" ,"breed7"="maroon" ,"breed8"="cyan" ,"breed9"="firebreck1" ,"breed10"="blue" ,"breed11"="bisque" ,"breed12"="chartreuse4")
tab1 %>% mutate(group=substr(breeds,1,3)) %>% ggplot(.,aes(x=PC1,y=PC2)) + + geom_point (aes(colour=breeds))+scale_color_manual(values=col)
Error: Insufficient values in manual scale. 121 needed but only 12 provided.