Learn R Programming

BSDA (version 1.2.0)

Fitness: Number of sit-ups before and after a physical fitness course

Description

Data for Exercise 7.71

Usage

Fitness

Arguments

Format

A data frame/tibble with 18 observations on the three variables

subject

a character variable indicating subject number

test

a character variable with values After and Before

number

a numeric vector recording the number of sit-ups performed in one minute

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples

Run this code
# NOT RUN {
t.test(number ~ test, data = Fitness, alternative = "greater", paired = TRUE)
# }
# NOT RUN {
Wide <- tidyr::spread(Fitness, test, number) %>%
mutate(diff = After - Before)
Wide
qqnorm(Wide$diff)
qqline(Wide$diff)
t.test(Wide$diff, alternative = "greater")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab