I have a data table which includes NA
s in some cells as below.
Datatable:
enter image description here However, I want to repeat 1st row in the column called "Category" to the following two rows written "NA" without any change in other columns which are "Numeric" and "Numeric.null". Same thing for 4th row in Category, repeat it to 5th and 6th rows but no change in other columns. New:
I'm just learning R programming. I have tried rep function. But I couldn't do. Please help me.