在更新到RVersion3.6.1(并更新了所有包)之后,我不能再在hang参数中使用plot.dendrogram了:
data(mtcars)
hc <- hclust(dist(mtcars))
plot(hc) # works as expected
den <- as.dendrogram(hc)
plot(den) # it works
plot(den, hang=0.01) # gives bunch of warnings:
# Warning messages:
# 1: In plot.window(...) : "hang" is not a graphical parameter
# 2: In plot.xy(xy, type, ...) : "hang" is not a graphical parameter
# 3: In axis(side = side, at = at, labels = labels, ...) :
# "hang" is not a graphical parameter
# 4: In axis(side = side, at = at, labels = labels, ...) :
# "hang" is not a graphical parameter
# 5: In title(...) : "hang" is not a graphical parameter有什么不对的地方吗?
version
# _
# platform x86_64-w64-mingw32
# arch x86_64
# os mingw32
# system x86_64, mingw32
# status
# major 3
# minor 6.1
# year 2019
# month 07
# day 05
# svn rev 76782
# language R
# version.string R version 3.6.1 (2019-07-05)
# nickname Action of the Toes 发布于 2020-04-15 17:29:09
hang=是as.dendogram的论点,而不是plot.*的论点
hc <- hclust(dist(mtcars[1:10,]))
op <- par(mfrow=c(1, 2))
plot(as.dendrogram(hc, hang=.01))
plot(as.dendrogram(hc))
par(op)

https://stackoverflow.com/questions/61234775
复制相似问题