Hi! Welcome to RStudio Community!
It looks like your code was not formatted correctly to make it easy to read for people trying to help you. Formatting code allows for people to more easily identify where issues may be occuring, and makes it easier to read, in general. I have edited you post to format the code properly.
In the future please put code that is inline (such as a function name, like mutate
or filter
) inside of backticks (`mutate`
) and chunks of code (including error messages and code copied from the console) can be put between sets of three backticks:
```
example <- foo %>%
filter(a == 1)
```
This process can be done automatically by highlighting your code, either inline or in a chunk, and clicking the </>
button on the toolbar of the reply window!
This will help keep our community tidy and help you get the help you are looking for!
For more information, please take a look at the community's FAQ on formating code
In addition, I am not sure that it is entirely clear what you are looking for... It looks like you SQL query should be correct (i.e. no clear syntax error that I can see) but without access to the database or any idea of what the data looks like, it is hard to tell you much more.
Also, what do you mean you want to take values from the database and not write them in the slider menu? The only slider input I see is for the number of histogram bins and that seems, to me, like something that you would want as a user input, rather than something stored in a database