align(HFWutils)R Documentation

align ordering of two vectors

Description

order one vector to match order of first vector

Usage

align(names1, names2)

Arguments

names1 ~~Describe names1 here~~
names2 ~~Describe names2 here~~

Details

inputs names1,names2 must have same lengths

Value

~Describe the value returned If it is a LIST, use

comp1 Description of 'comp1'
comp2 Description of 'comp2'

...

Note

~~further notes~~

Author(s)

Felix Wittmann hfwittmann@gmail.com

References

~put references to the literature/web site here ~

See Also

~~objects to See Also as help, ~~~

Examples

  
    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 


[Package HFWutils version 0.7.2007.09.02 Index]