Some basic code to simulate short genetic sequences.
library(yasss) example(sim_pop)
Also consider the sim_proc_many_pops function as a main function of yasss.
sim_proc_many_pops
yasss