Learn R Programming

phylosim (version 3.0.5)

getAcceptBy.GeneralInDel: Get the function used for accepting/rejecting indel events

Description

Get the function used for accepting/rejecting indel events.

Usage

# S3 method for GeneralInDel
getAcceptBy(this, ...)

Arguments

this

A GeneralInDel object.

...

Not used.

Value

A function object.

See Also

For more information see GeneralInDel.

Examples

Run this code
# NOT RUN {
	# create a GeneralInDel object
	# rejecting half of the events
	o<-GeneralInDel(
                   rate=1,
                   propose.by=function(process){return(5)},
                   accept.by=function( ){sample(c(TRUE,FALSE),1)}
                   );
	# set/get the acceptBy function
	setAcceptBy(o,value=function(){return(FALSE)})	# reject all events
	getAcceptBy(o)
	# set/get acceptBy function via virtual field
	o$acceptBy<-function(){return(TRUE)}		# accept all events
	o$acceptBy
 
# }

Run the code above in your browser using DataLab