Try this:
xx[match(zz, xx)]
On Thu, Aug 7, 2008 at 8:20 AM, jimineep <[EMAIL PROTECTED]> wrote:
>
> So imagine I have a vector:
>
> zz = c("a","c","d","b")
>
> and another vector:
>
> xx = c("d","c","a","b")
>
> I need to get xx in the same order as zz. I am sure this is very simple but
> I can't
So imagine I have a vector:
zz = c("a","c","d","b")
and another vector:
xx = c("d","c","a","b")
I need to get xx in the same order as zz. I am sure this is very simple but
I can't figure it out from the help pages for order or sort. Perhaps I'm not
trying hard enough but its been bugging me fo
2 matches
Mail list logo