How about

yourdata[ !duplicated(yourdata$ID), ]

?

See ?duplicated for more information.

HTH,
Jorge


On Mon, May 3, 2010 at 9:04 AM, someone <> wrote:

>
> as a r noob i am having another problem:
> i have a big dataframe where each row corresponds to one entry and each
> column is a field...
> for instance, i have the column ID and time and many more...
> Id like to get a dataframe where all IDs are just included once (some users
> with that ID might have several entries but Id like to kepp only one)..
> when i use unique I only get a list of the levels (or different IDs)
> could someone help me out and tell me how to get the dataframe with only
> one
> entry for each ID?
>
> --
> View this message in context:
> http://r.789695.n4.nabble.com/Delete-rows-with-duplicate-field-tp2123939p2123939.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help@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.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to