Skip to content

Instantly share code, notes, and snippets.

@ericnovik
Last active August 29, 2015 14:04
Show Gist options
  • Save ericnovik/6877a85d7f80aeb8af96 to your computer and use it in GitHub Desktop.
Save ericnovik/6877a85d7f80aeb8af96 to your computer and use it in GitHub Desktop.
Example using RStudio's manipulate function
require('manipulate')
manipulate(
{
x <- seq(-10, 10, length = 1000)
d <- dcauchy(x, scale = scale, location = location, log = Log)
plot(d ~ x, type = "l")
},
scale = slider(1, 10, step = 1),
location = slider(0, 10, step = 1),
Log = picker("FALSE" = FALSE, "TRUE" = TRUE)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment