From what can be seen in the screenshot, the code is running properly but is alerting the user that the results have introduced NA
values.
See the FAQ: How to do a minimal reproducible example reprex
for beginners for how to include enough data to allow answers that can explain why.