Yen's algorithm for igraph, adapted from Wikipedia's pseudocode.
The arguments are:
graph: your igraph graph object (warning: the edge's id will change by using this function, so make a copy with gcopy if you want to keep them intact);
source: source vertex;
target: target vertex;
num_k: number of shortest paths you want;
weights: name of the edge attribute that contain each edge's weight (this parameter is a string)