我试图使用R中的操作包创建一个相当大的菜单。我的问题是所有按钮都是在彼此之下写的。这是一个只有两个按钮的例子,是否有人知道如何更改它以使按钮显示为彼此相邻?允许更灵活的按钮放置的不同包也是可以接受的。
#install.packages("UsingR")
library(manipulate)
library(UsingR)
data(galton)
########## Manipulable Histogram ##########
myHist <- function(mu, Color){
hist(galton$child, col=Color, breaks=10)
lines(c(mu,mu), c(0, 150), col="red", lwd=5)
}
manipulate(myHist(mu, Color), mu = slider(62, 74, step=.5),
Color=picker("blue", "red", initial="blue"))