Skip to content

Selecting distinct values from a column

2 messages · Ann Huxtable, Marc Schwartz

#
Hello,

Is there an easy way (other than the obvious for loop?) to select distinct 
values from a column vector?

Many thanks

Ann
#
On Fri, 2004-11-19 at 19:01 +0000, Ann Huxtable wrote:
Presuming that by 'distinct' you mean 'unique', see ?unique
[1] 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
[1] 1 2 3 4 5


HTH,

Marc Schwartz