ResSel | R Documentation |
This function takes measurements of multiple traits and performs a linear regression and identifies those records with the largest and smallest residual. Originally it was written to perform a regression of horn size on body size allowing for high and low selection lines.
ResSel(data, traits, percent = 10, identifier = 1, model = "linear")
data |
this is a dataframe with subject identifiers and phenotypic trait values |
traits |
a numeric vector indicating the column containing the predictor and response variables in that order |
percent |
the percentage of highest and lowest residuals that should be identified |
identifier |
the column which contains the record numbers to identify individuals |
model |
currently this is not used |
This function returns a list
high line |
the ID numbers for the individuals selected for the high line |
low line |
the ID numbers of the individuals selected for the low line |
Heath Blackmon
data <- read.csv(file = system.file("horn.beetle.csv", package = "evobiR"))
ResSel(data = data, traits = c(2,3), percent = 15, identifier = 1, model = "linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.