2013-05-19 133 views
3

我正在嘗試在R中使用素數包,將數據集作爲列和物種數作爲列進行計算。我的數據格式爲文本文件(製表符分隔),幷包含大量'0'物種計數。然而,當我嘗試創建一個距離矩陣我得到以下錯誤消息:素食主義者包中的vegdist錯誤消息

嘶叫< - vegdist(DATA1,方法= 「佈雷」)
警告信息: 1:在vegdist(DATA1,方法=「佈雷」): 你有空行:他們的不同點可以是在方法「佈雷」 2無意義:在vegdist(DATA1,方法=「佈雷」):在結果中缺失值

這防止箱從執行NMDS:

> nmds <- metaMDS(data1, k = 2, 
+   distance = 'bray', autotransform = FALSE) 
Error in if (any(dist < -sqrt(.Machine$double.eps))) warning("some dissimilarities are negative -- is this intentional?") : 
    missing value where TRUE/FALSE needed 
In addition: Warning messages: 
1: In distfun(comm, method = distance, ...) : 
    you have empty rows: their dissimilarities may be meaningless in method 「bray」 
2: In distfun(comm, method = distance, ...) : missing values in results 

我該如何解決這個問題?

謝謝你的回答!

+0

第一個只是一個警告,而不是一個錯誤,所以你需要解釋是什麼讓你覺得你被阻止應用一個進一步的功能。如果您提供'dput(varespec)'的輸出,我們可能會想出一種刪除空項目的方法。 –

回答

0

某些列只包含0個計數。刪除這些將使其工作