Message-ID: <9153c6$7v8l5n@ironport10.mayo.edu>
Date: 2017-09-18T12:13:34Z
From: Terry Therneau
Subject: help matching rows of a data frame
This question likely has a 1 line answer, I'm just not seeing it. (2, 3, or 10 lines is
fine too.)
For a vector I can do group <- match(x, unqiue(x)) to get a vector that labels each
element of x.
What is an equivalent if x is a data frame?
The result does not have to be fast: the data set will have < 100 elements. Since this is
inside the survival package, and that package is on the 'recommended' list, I can't
depend on any package outside the recommended list.
Terry T.