I'm working in R, and I would like to replace all the empty elements of my data.frame with a NA value.
So, if I had this data frame as input:
unit delta
1 aaa 696
2 bbb 388
3 388
4 ccc 0
5 ddd 1630
6 eee 4
then I would like to have this as output:
unit delta
1 aaa 696
2 bbb 388
3 <NA> 388
4 ccc 0
5 ddd 1630
6 eee 4
How could I do this?