私は10個以上の環境ベクターを持つ一連のRDAをRにプロットしています。環境変数は、それぞれ5つのカテゴリのいずれかに分類されます。これらのカテゴリを反映するようにベクターの色を使いたいと思います。私は生の黒と白のプロットを作成し、それをパワーポイント(超時間がかかる)でトレースすることによって幾分ゲットーのやり方でやったが、これに固有の問題がたくさんあるが、それは少なくともよく見える。 そのプロットは、ベクトルの色に注意してください。 RDAベクターのグループ別R
出力をRネイティブプロットにしたいと考えています。私は基本プロットを作るために使用するプロットは現在、次のとおりです。
#download the data#
env<- read.csv("environmenta data.csv")
bio<- read.csv("bio data.csv")
#break out the groups of environmental vectors#
#these are purley for example#
group1<-as.matrix(subset(env,select=c(a,b,c))
group2<-as.matrix(subset(env,select=c(d,e,f,h))
group3<-as.matrix(subset(env,select=c(g))
group4<-as.matrix(subset(env,select=c(j,k,l,o))
group5<-as.matrix(subset(env,select=c(m,n,))
#run the RDA#
rda1<-rda(bio,env)
#Plot it#
plot(rda1,type="n",bty="n",main="",
xlab="XX% variance explained",
ylab="XX% variance explained",
col.main="black",col.lab="black", col.axis="white",
xaxt="n",yaxt="n")
#points(rda1,display="species",col="gray",pch=20)
#option to display species points
#text(rda2,display="species",col="gray")
#option for species labels
points(rda1,display="cn",col="black",lwd=2)#<<< guessing this is the key statement for my issue, but not sure
text(rda1,display="cn",col="black",cex=0.5)
私の答えは、このポイントに落ちると仮定しています - > COL =「...」コマンドが、私は言うするかどうかはわかりませんそれをグループごとにサブセット化します。すべての助けをいただければ幸いです。