Heat equation resolution by finite differences

Here you can find an implementation in R of the Euler explicit scheme for the one-dimensional Heat equation. A review of the theory behind PDE may be found in Guillaume Bal lecture notes, right here NumAnal.pdf. I keep its notations for convenience. The main result for the heat equation is that the explicit Euler scheme is convergent and stable if and only if lambda<=0.5, as you can see it below ;