hIndxMeanCalc4Traits: Calculate Mean Heritability Index for Traits

View source: R/hIndxMeanCalc4Traits.R

hIndxMeanCalc4TraitsR Documentation

Calculate Mean Heritability Index for Traits

Description

This function processes heritability index data, filtering out empty trait names, and calculates the mean heritability for each unique trait. The resulting output is a data frame with traits and their corresponding mean heritability values.

Usage

hIndxMeanCalc4Traits(hIndexValDF)

Arguments

hIndexValDF

A data frame containing heritability index values with at least two columns: Trait.name and Heritability. The Trait.name column should contain trait identifiers, and the Heritability column should contain numeric heritability values.

Value

A data frame with two columns: Trait.name and MeanValue, where MeanValue represents the mean heritability for each trait.

References

Hu et al. (2018) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/nar/gky1084")}

Examples


# Example of usage:
hIndexValDF <- data.frame(Trait.name = c("Trait1", "Trait2", "Trait1", "Trait2"),
                          Heritability = c(0.5, 0.6, 0.7, 0.8))
result <- hIndxMeanCalc4Traits(hIndexValDF)
print(result)



HEssRNA documentation built on April 3, 2025, 9:29 p.m.