Learn R Programming

pcrcoal (version 1.2.0)

sample.trs: Sample subsample sizes and size trajectories according to a PCR experiment

Description

This method also returns the subsample sizes and size trajectories sampled according to the PCR experiment specified by the parameters stored in the slots of the PCRcoal object given as the first argument.

This method does not sample the tree, which makes it faster than the sample.tree method. Use this method if you are interested only in sampling subsamples and size trajectories.

Usage

"sample.trs"(object)

Arguments

object
A PCRcoal object, with all the slots defined.

Value

A list containing the following elements:

See Also

The PCRcoal class. The sample.tree and sample.tnt methods.

Examples

Run this code
	# Construct a PCRcoal object 
	# and specify the experimental conditions:
	sim <-PCRcoal(
        initial.size    =5,
        sample.size     =10,
        nr.cycles       =30,
        efficiencies    =c(rep(0.1, 30))
    	)

	# Sample subsample sizes and size trajectories:
	res <- sample.trs(sim)

	# Print subsample sizes:
	print(res$subsamples)

	# Print size trajectories:
	print(res$trajectories)

Run the code above in your browser using DataLab