Skip to content
Prev 320473 / 398506 Next

make R program faster

On 13-03-28 7:07 AM, Christof Klu? wrote:
Generally matrices are much faster than dataframes.  Your code spends 
about 35-60% of its time in dataframe indexing methods, so you might be 
able to double the speed by switching to matrices.

The disadvantage is that matrices can only hold one type, so you may 
need multiple matrices to replace one dataframe, and that will make your 
code harder to read.

Duncan Murdoch