one_row_per_id | R Documentation |
data.frame
A convenience function to filter a data.frame
retaining one row for
each unique value of an ID column. Only columns that are invariant (and
hence unambiguouse) within each ID level are retained.
one_row_per_id(data, idcol)
data |
A |
idcol |
The name or numeric index of the ID column. |
A data.frame
in which each ID appears in a
single row. Only columns that are invariant (and hence unambiguous)
within each ID level are retained.
library(nlme) one_row_per_id(Phenobarb, "Subject")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.