Please don't ask us to guess about the data. Post a reproducible example, called a reprex. Not many are going to spend the time trying to reverse engineer the problem and a search on plm
in the community here shows only 20 posts, so you're unlikely to come to the attention of anyone here who has seen the error message and can tell you how to fix it off the top of her head.
Otherwise, you can look for guidance like this S/O post to see how it illuminates your problem.