R/sim_obj.R

Defines functions sim_obj

#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)
deponent-verb/popgen.stats documentation built on Nov. 4, 2019, 10:26 a.m.