setDist.ContinuousInsertor: Set the length sampling expression

Description Usage Arguments Value Author(s) See Also Examples

Description

Set the length sampling expression.

The length sampling expression can be any valid R expression returning a numeric vector of length one. The value returned by the expression will be rounded.

Usage

1
2
## S3 method for class 'ContinuousInsertor'
setDist(this, value, ...)

Arguments

this

A ContinuousInsertor object.

value

An R expression.

...

Not used.

Value

An R expression object.

Author(s)

Botond Sipos, Gregory Jordan

See Also

For more information see ContinuousInsertor.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	# create object
	o<-ContinuousInsertor(rate=1)
	# set/get length sampling expression
	setDist(o, expression(rnorm(1,mean=3, sd=2)))
	getDist(o)
	# set/get length sampling expression via virtual field
	o$dist<-expression(rnorm(1,mean=6,sd=3))
	o$dist
	# set maxLength
	o$maxLength<-10
	# propose a length
	proposeLength(o)
 

phylosim documentation built on Nov. 22, 2019, 1:07 a.m.