sameOrder: Check if two character vectors has the same element order

Description Usage Arguments Value Author(s) Examples

View source: R/sameOrder.R

Description

Usually, we have to check taht the col names(sample name) of an expression matrix is in the same order with the sample names listed in the metainfor data matrix, this function is intended for this purpose

Usage

1
sameOrder(x, y)

Arguments

x

vector, must be a character vector with no duplicated elements

y

another vector which is used to be compared against, must be a character vector with no duplicated elements too

Value

a list with two components: status and position

Author(s)

guangchun hanguangchunATgmail.com

Examples

1
2
3
4
5
x<-sample(letters,6)
y<-sample(x, 6)

samOrder(x,x)
samOrder(x,y)

htc502/ewrefxn documentation built on Feb. 2, 2020, 9:14 a.m.