simlinkedSTR {genealogy}R Documentation

A Function to simulate linked STR loci from the coalescent

Description

This function generates

Usage

simlinkedSTR(n, loci, r, theta)

Arguments

n Number of individuals to sample
loci Number of linked loci
r The recombination fraction between loci.
theta Theta at each locus

Details

~~ If necessary, more details than the __description__ above ~~

Value

~Describe the value returned If it is a LIST, use

comp1 Description of `comp1'
comp2 Description of `comp2'

...

WARNING

....

Note

~~further notes~~

Author(s)

Ian Wilson

References

~put references to the literature/web site here ~

See Also

~~objects to SEE ALSO as ~~fun~~, ~~~

Examples

##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--         or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(n,loci,r,theta)
{
#__declspec(dllexport) void simulatelinkedSTR(int *n, int *loci, 
# int *r, double *itheta, int *data)
    nr _ as.integer(length(r));
    if (length(theta)==1) theta_rep(theta,loci);
    a_.C("simulatelinkedSTR",
            as.integer(n),
            as.integer(loci),
            as.double(r),
            nr,
            as.double(theta),
            d=integer(n*loci),
        );
    matrix(a$d,ncol=loci);
  }

[Package genealogy version 0.01 Index]