prep_geno_data: Prepare your genetic cline data for loading into Stan

Description Usage Arguments Details Value See Also Examples

View source: R/prep_geno_data.R

Description

Converts a dataframe containing your genetic data into the list format required for input to Stan. See details below for a description of the possible input formats.

Usage

1
prep_geno_data(dataframe, type = c("bi", "multi"))

Arguments

dataframe

A dataframe containing your cline data. See details for possible formats.

type

Model type. Either "bi", for the binomial model, or "multi", for the multinomial model.

Details

The input dataframe can be a data frame or a tibble. Each row should contain the information for one sampling site. For the multinomial model, four named columns must be present, all other columns will be ignored:

For the binomial model, the user can supply either a data frame with the four columns above, or a dataframe with three named columns present (again, other columns are ignored):

Value

Your data in Stan-ready list format.

See Also

fit_geno_cline

Examples

1
2
3
4
## Not run: 
prep_geno_data(yourdata, type = "bi")

## End(Not run)

tjthurman/BAHZ documentation built on May 30, 2020, 8:28 a.m.