Skip to content
Prev 274847 / 398506 Next

listing all occurrences in a vector

Dear all,

I have a dataframe with two columns, where NUMBER is the number of occurrences of DEPTH: 

  DEPTH NUMBER
1     2      1
2     3      2
3     2      3
4     5      1
I want a column or a vector where all the DEPTHs are listed: 2, 3, 3, 2, 2, 2, 5 (NUMBER=1 in all cases). 

Is there any simple solution to the problem?

Thanks,
Jonas


Jonas Fransson
Ph.D.stud.
?
IVA /?Det Informationsvidenskabelige Akademi
Royal School of Library and Information Science
Birketinget 6 
DK-2300 Copenhagen S
T +45 32 58 60 66
D +45 32 34 15 10
www.iva.dk/jf?