search for: calc_history

Displaying 1 result from an estimated 1 matches for "calc_history".

2006 Jan 23
1
formatC slow? (or how can I make this function faster?
...x of capture occasions to format that an external program can read. The job is to basically take a row of matrix, like > smp[1,] [1] 1 1 0 1 1 1 0 0 0 0 and convert it to the equivalent string "1101110000" I'm having problems doing this in a speedy way. The simplest solution (calc_history below, using apply, paste and collapse) takes about 2 seconds for a 10,000 x 10 matrix. I thought perhaps paste might be building up the string in an efficient manner, so I tried using matrix multiplication and formatC (as in calc_history2). This is about 25% faster, but still seems slow. smp &...