2017-11-25 17 views
1

私はRには新しく、CCAプロットに種の名前を表示しようとしています。私はあなたが切り捨てられた種の名前でデフォルトのポイントを置き換えるために空のCCAプロットを作成した後にorditorpを使うことができることを発見しました。私はorditorp機能を実行しようとするしかし、私は、エラーメッセージが表示されます:orditorpを使用しているエラー:範囲外の添え字

Error in x[ord, ] : subscript out of bounds 
In addition: Warning messages: 
1: In x[, 1] - w : 
    longer object length is not a multiple of shorter object length 
2: In x[, 1] + w : 
    longer object length is not a multiple of shorter object length 
3: In x[, 2] - h : 
    longer object length is not a multiple of shorter object length 
4: In x[, 2] + h : 
    longer object length is not a multiple of shorter object length 

私が実行しているコードは以下の通りです:

bmi_all<- read.delim("BMI_data_all_var.txt", header=T, sep="\t", row.names=1) 
library(vegan) 
taxa.matrix <- subset(bmi_all, select=Chironomidae:Neoporus) 
attach(bmi_all) 
#perform a correspondance analysis on my bmi data 
bmi_ca<- cca(taxa.matrix~TSS+BChla+SChla+DSub, na.action=na.exclude) 
cnam<-make.cepnames(names(taxa.matrix)) 
stems<-colSums(taxa.matrix) 
plot(bmi_ca, dis="sp", type="n") 
orditorp(bmi_ca,"sp",label=cnam,priority=stems,pch="+",pcol="red") 

私はplot(bmi_ca, dis="sp", type="t")を実行した場合、私はCCAプロットを取得するが、としてその種の名前が非常に乱雑な命綱を生み出すと予想された。 taxa.matrixをとstemsの両方を作成するときにbmi_caに置き換えようとしましたが、orditorpを適用しようとしたときに同じエラーが発生します。

アイデア?

ありがとうございます! -Jordan

答えて

0

は、いくつかのあいた後、私は私の問題を解決するために管理しました!私は自分のデータセットからサイトを削除しました。この結果、いくつかの種は存在量がゼロになりました。コードを削除してコードを実行した後、正常に機能しました。

関連する問題