Re: [R] Remove records from a large dataframe

2012-10-22 Thread penguins
Thanks Rui, your solution works great and is so fast! -- View this message in context: http://r.789695.n4.nabble.com/Remove-records-from-a-large-dataframe-tp4646990p4647029.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pro

Re: [R] Remove records from a large dataframe

2012-10-22 Thread arun
3    4  A.K. - Original Message - From: penguins To: r-help@r-project.org Cc: Sent: Monday, October 22, 2012 7:04 AM Subject: [R] Remove records from a large dataframe Hi, I am trying to remove a series of records from a large dataframe. The script I have written works fine but takes a long time

Re: [R] Remove records from a large dataframe

2012-10-22 Thread Rui Barradas
Hello, If I understand it well, idx <- !dat$id %in% bad$id dat[idx, ] Also, to create bad you are complicating, this would do: bad <- data.frame(id = c(1,4)) Hope this helps, Rui Barradas Em 22-10-2012 12:04, penguins escreveu: Hi, I am trying to remove a series of records from a large dat

[R] Remove records from a large dataframe

2012-10-22 Thread penguins
Hi, I am trying to remove a series of records from a large dataframe. The script I have written works fine but takes a long time to run. Can anyone suggest a quicker way to do this? Here is an example of the code I've written. The end result of this bit of code would be a dataframe with any record