plotFamily-methods: It draws the profile of the exposome in an ExposomeSet

plotFamilyR Documentation

It draws the profile of the exposome in an ExposomeSet

Description

This function draw a profile of the full exposome into an ExposomeSet or the profile of the exposures in a specific family. For continuous families, box-plots are drawn; while for categorical families accumulative bar-charts.

Usage

plotFamily(x, family, group, group2, scatter = TRUE, na.omit = TRUE)

Arguments

x

ExposomeSet which exposome will be plotted.

family

Name of the familty that will be drawn. 'all' is allowed to draw a grid with all the families.

group

If set it displays the family grouped by the given phenotype.

group2

If set it displays the family grouped by the given phenotype.

scatter

(default TRUE) If the family to be plotted is continuous, the samples will be shown.

na.omit

(default TRUE) Do not show NA values.

Value

A ggplot object if a family was selected. invisible() if argument family was set to "all".

See Also

plotHistogram to draw the shape of an exposure, plotMissings to plot the missing data from an ExposomeSet

Examples

data("exposome")
plt <- plotFamily(expo, family = "Metals")
plt <- plt + ggplot2::ggtitle("Metals")
plt
plt <- plotFamily(expo, family = "Indoor air")
plt <- plt + ggplot2::ggtitle("Indoor air")
plt

isglobal-brge/rexposome documentation built on Feb. 4, 2023, 12:35 p.m.