1
}
> bt
[1] 2 6 3 5 1 4
However, the time complexity is O(N2).
When N is larger than 100, it takes too much time.
Is there any faster way to fix it?
best
Xueming
xmliu1...@gmail.com
[[alternative HTML version deleted]]
_
Thanks for your kind replies
Jorge's answer helps.
warm wishes
Xueming
xmliu1...@gmail.com
From: Jorge I Velez
Date: 2014-04-26 23:41
To: xmliu1...@gmail.com
CC: r-help
Subject: Re: [R] Faster way to transform vector [3 8 4 6 1 5] to [2 6 3 5 1 4]
Hi Xueming,
Try
(1:length(bo))
2 matches
Mail list logo