I looking for a python function like fillna(method='bfill', limit=30)
but inside R.
I have this data frame.
DATE ELE.CN
<dttm> <dbl>
1 2009-06-30 00:00:00 115942928608
2 2009-06-28 00:00:00 115942928608
3 2009-06-27 00:00:00 115942928608
4 2009-06-26 00:00:00 115942928608
5 2009-06-24 00:00:00 NA
6 2009-06-23 00:00:00 NA
7 2009-06-21 00:00:00 NA
8 2009-06-20 00:00:00 NA
9 2009-06-19 00:00:00 NA
10 2009-06-17 00:00:00 NA
...
The idea I have is to fill a few NAS with a limit of 30. I have searched, but have not found anything similar.
Thank you.