Viol.by.gen: Violin plot by genotype

View source: R/Violin_by_genotype.R

Viol.by.genR Documentation

Violin plot by genotype

Description

This tool creates violin plots corresponding to each genotype.

Usage

Viol.by.gen(qt, g, trait_name = "qt trait", title = "")

Arguments

qt

A numeric vector.

g

An integer vector.

trait_name

A string.

title

A string.

Value

A violin plot

Examples

n_val <- 50000L
geno_vec <- sample(c(0, 1, 2), size = n_val, replace = TRUE)
qt_vec <- rnorm(n_val) * (1.3^geno_vec) + 1 * geno_vec
Viol.by.gen(qt_vec, geno_vec)

gnonadd documentation built on Sept. 22, 2023, 5:07 p.m.