On Jun 9, 2012, at 13:16 , wl2776 wrote:
>
> $sample.interval
> [1] 0.02
>
> $sampling.time
> [1] 0.02
>
> Apparently, it is about twise faster.
Too fast to measure, I'd say. Try system.time, and/or multiple replications.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Busi
Sorry, here are the profiles:
summaryRprof("get_tau")
$by.self
self.time self.pct total.time total.pct
"cbind" 0.02 50 0.04 100
"unlist" 0.02 50 0.0250
$by.total
total.time total.pct self.time self.pct
"cbind" 0.04
I've created another get_tau implementation, using sapply and apply.
http://pastebin.com/3FaHAL1i
However, the second variant, with expand.grid still appeals me most.
I don't undestand, why it is so slow.
--
View this message in context:
http://r.789695.n4.nabble.com/More-simple-implementation
On Jun 9, 2012, at 11:08 , wl2776 wrote:
> Hi all.
> I'm developing a function, which must return a square matrix.
>
> Here is the code:
> http://pastebin.com/THzEW9N7
>
> These functions implement an analog of two embedded for cycles.
>
> The first variant creates the resulting matrix by colu
Hi all.
I'm developing a function, which must return a square matrix.
Here is the code:
http://pastebin.com/THzEW9N7
These functions implement an analog of two embedded for cycles.
The first variant creates the resulting matrix by columns, cbind()-ing them
one by one.
The second variant creates
5 matches
Mail list logo