This is the SPDE tutorial by Finn Lindgren published in the IBSA Bulletin no 4, 2012 , and the version here is a revised one:
tutorial
R-code