[R] Inserting a blank row to every other row

Saba Sehrish sabasehrish at yahoo.com
Sun Apr 24 14:02:29 CEST 2016


Hi

I need to insert a blank row after every row in R data frame. I have achieved it through:


df[rep(1:nrow(df),1,each=2),]

But it inserts a row with name of previous row, while i want a complete blank row without any name/title.

Please guide me

Regards
Saba



More information about the R-help mailing list