我在與do.call
搞混。基於「plot」理解do.call語義
I = iris
do.call(what = "plot", args = c(I$Sepal.Length ~ I$Sepal.Width))
# This seems fine
p = list(x = I$Sepal.Length, y = I$Sepal.Width)
do.call(what = "plot", args = p)
# This looks weird
p1 = list(x = I$Sepal.Length, y = I$Sepal.Width, xlab = "")
do.call(what = "plot", args = p1)
# A bit less weird
p2 = list(x = I$Sepal.Length, y = I$Sepal.Width, xlab = "", ylab = "")
do.call(what = "plot", args = p2)
# And this gives the same as the first do.call
那麼,爲什麼,我有供應軸標籤surpress所有這些數字,我得到使用do.call
什麼時候?
@ZheyuanLi這應該是'='!。前者調用'plot.formula',後者調用'plot.default'。這就是軸標籤不同的原因。 – Roland
不,它們是指軸標籤。我懷疑他們甚至已經注意到切換x和y的問題。 – Roland
我會寫一個答案。 – Roland