user3722006
user3722006

Reputation: 23

R Manipulate Package

Im trying to create a rather large menu using the manipulate package in R. My problem is that all the buttons are written underneath one another. Here is an example with only two buttons, does anyone know how to change it so that the buttons appear NEXT to one another? A different package that allows for more flexible button placement would be acceptable too.

#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"))

Upvotes: 2

Views: 2708

Answers (1)

Gregor Thomas
Gregor Thomas

Reputation: 145895

Turning my comment into an answer.

Have you looked at shiny? I think it would be fair to call it manipulate's successor: shiny.rstudio.com. You will find it very flexible, but hopefully still approachable!

Upvotes: 1

Related Questions