[R] transform
Ken Knoblauch
knoblauch at lyon.inserm.fr
Sun Nov 20 12:12:23 CET 2005
<I have a=c(1,1,4,3,5);
< then
< > a
<[1] 1 1 4 3 5
<
< is there any function to transform a to b:
< >b
< > a
<[1] 1 3 4 5
How about:
unique(sort(a))
or
sort(unique(a))
> Thanks!
--
Ken Knoblauch
Inserm U371
Cerveau et Vision
Dept. of Cognitive Neuroscience
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.lyon.inserm.fr/371/
More information about the R-help
mailing list