50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

phylosim (version 3.0.5)

setOmegas.CodonSequence: Set the omegas for a collection of sites

Description

Set the omegas for a collection of sites.

Usage

# S3 method for CodonSequence
setOmegas(this, process, value, index, ...)

Arguments

this

A CodonSequence object.

process

A process object inheriting from GY94.

value

A vector containing the new values of the site-process specific parameter, recycled if shorter than the index vector.

index

A vector of positions. It is set to 1:seq$length if omitted.

...

Not used.

Value

A numeric vector.

See Also

For more information see CodonSequence.

Examples

Run this code
# NOT RUN {
	# create a GY94 process
	p<-GY94()
	# create a CodonSequence object,
	# attach a process p
	s<-CodonSequence(length=20,processes=list(list(p)))
	# set omega values in range 1:5
	setOmegas(s,p,c(0.5,1,1.5),1:5)
	# get omega values from siutes 1,2,3,10, and 20
	getOmegas(s,p,c(1:3,10,20))
 
# }

Run the code above in your browser using DataLab