powered by
This function is deprecated in favor of match_names() and will be removed in a future release.
match_names()
vector.namesmatch(v, names, errname = NULL)
returns v, with elements reordered
v
a vector (or list) with named elements, to be reorderd
a character vector of element names, corresponding to names of v, specificying desired orering of v
optional, name to be reported in any error messages. default to deparse(substitute(v))
deparse(substitute(v))
test<-list(c=1,b=2,a=3) vector.namesmatch(test,names=c('a','c','b'))
Run the code above in your browser using DataLab