### Tag: optimization

Make your R scripts faster with C code

## Make your R scripts faster with C code

Sometimes, a problem can easily be solved using loops in R, however this way may be very slow. For example, one wants to estimate a quantile by Monte Carlo of : $S := \sum_{k=1}^{N} X_k,$ where $$N \sim \mathcal{P}(\lambda)$$ and $$X := (X_{k})_{k \geq 1}$$ is a sequence of i.i.d. random variables which …