i have a dataframe with field as list(), but sometimes it have null values, i've tried replace(is.null(.), 0) in my query but nothing happened.
i want to :
- replace train with
list(date=exactly date in the rows, sales=0) - displaying train.sales
here is my dataframe : https://pasteboard.co/IsclvYT.png
content inside dataframe : https://pasteboard.co/IscmiwV.png
Thanks...
As the 'train' is a
list, we can loop through thelistand replace theNULLelements with0Based on the comments, the OP wanted to replace the
NULLelements with the corresponding 'date' from 'test'Or using
base R