[R] Inserting a blank row to every other row
Ulrik Stervbo
ulrik.stervbo at gmail.com
Sun Apr 24 17:21:54 CEST 2016
Hi Saba,
I don't know how to do what you want and I also cannot see why.
If you describe what you hope to achieve there might be a different
solution.
Best wishes
Ulrik
Saba Sehrish via R-help <r-help at r-project.org> schrieb am So., 24. Apr.
2016 14:04:
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]
More information about the R-help
mailing list