Example using Rstudio's manipulate function