question like this: I have data tag and phi, when tag are the same, then phi are the same. like below, tag have value 1 2 3 4 and phi have value .9 .3 1 0.
my question is, how can I get the result like tag=c(1,2,3,4) and corresponding phi=c(.9,.3,1,0) tag phi 2 .3 1 .9 2 .3 3 1 2 .3 1 .9 3 1 4 0 1 .9 2 .3 tag=c(2,1,2,3,2,1,3,4,1,2) phi=c(.3,.9,.3,1,.3,.9,1,0,.9,.3) [[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.