You are welcome. For the second question, you need to provide a bit more information about your data. Even better, try to set up a reprex using one of the built-in data sets such as mtcars. See below for information about how to write a good reprex.
reprex
mtcars