Hi,
Welcome to the RStudio community!
Could you provide a bit more detail about the input dataset you have and the output format you like. I'm a bit confused by what you've provided now.
You can always use the following link to learn how to better structure your post:
Good luck!
PJ