[R] Odp: Delete/insert rows in data matrix

From: Petr PIKAL <petr.pikal_at_precheza.cz>
Date: Thu, 31 Jan 2008 14:15:33 +0100


Hi

data[, -5] without fifth column
data[-5,] without fifth row
 rbind(data[1:2,], NA, data[3:4,]) insert row of NA

Regards

Petr
petr.pikal_at_precheza.cz

r-help-bounces_at_r-project.org napsal dne 31.01.2008 13:52:02:

> Hello all,
>
> I have the following problem. I want to insert blank rows in an data
frame
> so as to make it comparable with another data frame with more rows. How
can
> I insert these rows?
> If this is not solvable, then, alternatively, is it easy to delete rows
from
> a data frame?
>
> Thanks for helping,
> Eleni
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> 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.



R-help_at_r-project.org mailing list
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. Received on Thu 31 Jan 2008 - 13:27:20 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 31 Jan 2008 - 14:00:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive