na.locf for panel data

Hi, I have panel data with one variable that contains NA's for one year. I used zoo's na.locf to use the values from the year before but seems like the function did not recognize that there were different entities (four different zones).
Is there any other function I could use and make sure panel data is recognized?
Thank you,
Marianna

Hi,

Welcome to the RStudio community!

In order for us to help you with your question, please provide us a minimal reproducible example where you provide a minimal (dummy) dataset and code that can recreate the issue. Once we have that, we can go from there. For help on creating a Reprex, see this guide:

Good luck!
PJ

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.