Tag Archives: Compiler (Package)

Looking at speed

by Karl-Kuno Kunze

This post wants to remind you of the package compiler by Luke Tierney and to somehow save the honor of the for loop that is rather likely to be discredited by R users.

As an ardent admirer of all functions with a ply inside I cannot help but praise the elegance of avoiding everything with a for inside. However, every now and then fervent disregard of the for loop may lead to more elegant but slower code. In the following we write some purely demonstrative code and take a look at time consumption.

Continue reading