Re: [R] Randomly drawing observations from factors.

2008-07-31 Thread Marc Schwartz
on 07/31/2008 03:20 PM Economics Guy wrote: I have a large data set where one of the columns needs be a unique identifier (ID) for each row. However for a few of the rows they have the same ID. What I need to do is randomly draw one of the rows and keep it in the data frame and drop all the other

[R] Randomly drawing observations from factors.

2008-07-31 Thread Economics Guy
I have a large data set where one of the columns needs be a unique identifier (ID) for each row. However for a few of the rows they have the same ID. What I need to do is randomly draw one of the rows and keep it in the data frame and drop all the others which have the same ID. For example: v1 <-