align(HFWutils) | R Documentation |
order one vector to match order of first vector
align(names1, names2)
names1 |
~~Describe names1 here~~ |
names2 |
~~Describe names2 here~~ |
inputs names1,names2 must have same lengths
~Describe the value returned If it is a LIST, use
comp1 |
Description of 'comp1' |
comp2 |
Description of 'comp2' |
...
~~further notes~~
Felix Wittmann hfwittmann@gmail.com
~put references to the literature/web site here ~
~~objects to See Also as help
, ~~~
x1 <- 1:4 x2 <- c(1,3,2,4) align(names1=x1, names2=x2) # [1] 1 3 2 4 x1 <- LETTERS[1:4] x2 <- c(1,3,2,4) align(names1=x1, names2=x2) # [1] 1 3 2 4 x1 <- LETTERS[1:4] x2 <- LETTERS[c(1,3,2,4)] align(names1=x1, names2=x2) # [1] 1 3 2 4 x1 <- LETTERS[1:5] x2 <- LETTERS[c(1,3,2,4)] align(names1=x1, names2=x2) # lengths don't match : # names1 : A B C D E # names2 : A C B D