# BODYFAT: Body Fat Composition In PASWR2: Probability and Statistics with R, Second Edition

## Description

Values from a study reported in the American Journal of Clinical Nutrition that investigated a new method for measuring body composition

## Usage

 `1` ```BODYFAT ```

## Format

A data frame with 18 observations on the following 3 variables:

• `age` (age in years)

• `fat` (percent body fat composition)

• `sex` (a factor with levels `F` for female and `M` for male)

## Source

Mazess, R. B., Peppler, W. W., and Gibbons, M. (1984) “Total Body Composition by Dual-Photon (153 Gd) Absorptiometry.” American Journal of Clinical Nutrition, 40, 4: 834-839.

## References

Ugarte, M. D., Militino, A. F., and Arnholt, A. T. 2015. Probability and Statistics with R, Second Edition. Chapman & Hall / CRC.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13``` ```# base graphics boxplot(fat ~ sex, data = BODYFAT) # ggplot2 approach ggplot(data=BODYFAT, aes(x = sex, y = fat, fill = sex)) + geom_boxplot() + labs(x = "",y = "Percent body fat") + scale_x_discrete(breaks=c("F", "M"), labels =c("Female", "Male")) + guides(fill = "none") + scale_fill_manual(values = c("red", "green")) # Brewer Colors ggplot(data=BODYFAT, aes(x = sex, y = fat, fill = sex)) + geom_boxplot() + labs(x = "", y = "Percent body fat") + scale_x_discrete(breaks=c("F", "M"), labels =c("Female", "Male")) + guides(fill = "none") + scale_fill_brewer() ggplot(data=BODYFAT, aes(x = fat, fill = sex)) + geom_density(alpha = 0.4) + scale_fill_brewer() ```

PASWR2 documentation built on Sept. 5, 2021, 5:44 p.m.