Where's the problem? What data are you using? What (other) code are you using, and what have you tried? What is your expected result? Please see https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info for great suggestions on how to improve questions to be reproducible and something that we can actually act on. As it stands, I don't know what you're doing with this.
– r2evansAug 14 '21 at 14:01
What does your data look like? What is the error message. Would be great, if you could provide us with a minimal reproducible example like r2evans mentioned. Otherwise it is quite hard for us to help you.
– Steffen MoritzAug 15 '21 at 13:23