Please briefly describe your problem and what output you expect. If you have a more general question, you might find a quicker answer on https://community.rstudio.com/ or https://stackoverflow.com/.
Please include a minimal reproducible example (also called a reprex). If you’ve never heard of a reprex before, there’s a great overview at https://www.tidyverse.org/help/#reprex.