#Constructor function for the simulation object. The simulation object contains a neat
#set of useful information about a discoal simulation that can be used for analysis.
#Users aren't meant to call this function themselves.
sim_obj<-function(cmd,seeds,segsites,positions,genome_matrix,sweep,select_coeff,fix_generation){
obj<-list(
cmd=cmd,
seeds=seeds,
num_seg=segsites,
pos=positions,
genomes=genome_matrix,
sweep=sweep,
s=select_coeff
)
class(obj)<-"sim_obj"
return(obj)
}
#summary/print object. Wickam R packages book.
# test<-function(x,y=5){
# return(x+y)
# }
#
# test(1,2)
# test(1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.