4
A
回答
6
你可以使用
library(psych)
pairs.panels(iris[,-5], hist.col="white", scale=TRUE)
5
此圖可完全從?pairs
下給出的例子來構建。
panel.hist <- function(x, ...) {
usr <- par("usr"); on.exit(par(usr))
par(usr = c(usr[1:2], 0, 1.5))
h <- hist(x, plot = FALSE)
breaks <- h$breaks; nB <- length(breaks)
y <- h$counts; y <- y/max(y)
rect(breaks[-nB], 0, breaks[-1], y, ...)
}
panel.cor <- function(x, y, digits = 2, prefix = "", cex.cor, ...) {
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r <- abs(cor(x, y))
txt <- format(c(r, 0.123456789), digits = digits)[1]
txt <- paste0(prefix, txt)
if(missing(cex.cor)) cex.cor <- 0.8/strwidth(txt)
text(0.5, 0.5, txt, cex = cex.cor * r)
}
pairs(iris, lower.panel=panel.smooth, upper.panel=panel.cor,
diag.panel=panel.hist)
相關問題
- 1. 圖像沒有在生產中顯示
- 2. 知道函數和數據集可在一個包中沒有任何手動和信息(黑箱)R
- 3. Qt5 QAudioOutput沒有產生任何聲音
- 4. 生產中的Rails 3.2沒有顯示任何資產
- 5. 有沒有這個圖標(共享圖標)的任何Unicode?
- 6. R:這熱圖/圖像得到行排序沒有任何樹狀情節?
- 7. 如何在Magento中找到沒有圖像的所有產品?
- 8. 這個函數是否產生任何內存泄漏?
- 9. 有效地包裝和拆包函數參數中的R
- 10. 灰燼CSS - 圖像沒有在生產中加載
- 11. 的Watir - 獲取圖像而沒有任何財產
- 12. WooCommerce產品有'產品圖像',但沒有'精選圖像'
- 13. 這個事件函數沒有任何原因沒有觸發嗎?
- 14. R函數產生錯誤
- 15. 在C++中沒有這個函數的匹配函數
- 16. 爲什麼這個函數沒有返回任何東西?
- 17. 爲什麼這個函數沒有返回任何值?
- 18. 爲什麼這個函數似乎沒有返回任何值
- 19. Django + Haystack +飛快移動,在生產中沒有任何結果
- 20. 有沒有像/ proc中的Windows任何
- 21. CQL中有沒有像SOUNDS LIKE這樣的函數?
- 22. 產生一個隨機數沒有隨機函數
- 23. ASP源代碼地圖?有沒有簡單的方法來產生這個?
- 24. 數組參數在像「didSelectRowAtIndexPath」和「prepareForSegue」這樣的函數中沒有被調用
- 25. 有沒有像R的requirements.txt?
- 26. Sylius沒有CSS和圖像,沒有/ web /資產目錄
- 27. @ 2x圖像資產沒有@ 1x資產
- 28. 有沒有像返回一個函數?
- 29. R:有故障產生的XPath R上
- 30. 我在沒有任何日誌的生產環境中獲得500個
老實說,而這無疑是一個編程問題和排序的屬於這裏,你可能不得不通過在http://stats.stackexchange.com/統計門戶網站更好的運氣。 – 2014-10-29 05:34:52
可能你想看看ggplot2,GGally。他們可能不會給你確切的答案。但非常接近。 – KFB 2014-10-29 05:35:36
我喜歡它,GGally很棒。 – parvij 2014-10-29 06:28:40