[R] "Delete row" takes ages. alternative?!

sven sven.bca at googlemail.com
Sun Jul 10 01:02:39 CEST 2011

I am a student from Liverpool UK, working with some genetic data using R.

I got a data.frame with about 250.000 rows and using a for loop to delete
certain rows using the following code:

x <----- is a data.frame 
 x = x[-5,] ---> deletes row 5
 x = x[-10,] ---> delets row 10
x = x[-i,]   --> deletes row i

This takes ages for some reason. Isnt there a quicker way to do this?!

View this message in context: http://r.789695.n4.nabble.com/Delete-row-takes-ages-alternative-tp3656949p3656949.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list