Learn R Programming

fastR2 (version 1.2.4)

Pallets: Pallet repair data

Description

The paletts data set contains data from a firm that recycles paletts. Paletts from warehouses are bought, repaired, and resold. (Repairing a palette typically involves replacing one or two boards.) The company has four employees who do the repairs. The employer sampled five days for each employee and recorded the number of pallets repaired.

Arguments

Format

A data frame with 20 observations on the following 3 variables.

pallets

number of pallets repaired

employee

a factor with levels A B C D

day

a factor with levels day1 day2 day3 day4 day5

Examples

Run this code

data(Pallets)
# Do the employees differ in the rate at which they repair pallets?
pal.lm1 <- lm(pallets ~ employee, data = Pallets) 
anova(pal.lm1)
# Now using day as a blocking variable
pal.lm2 <- lm(pallets ~ employee + day, data = Pallets) 
anova(pal.lm2)
gf_line(pallets ~ day, data = Pallets,
		group = ~employee,
		color = ~employee) %>%
  gf_point() %>%
  gf_labs(title = "Productivity by day and employee")

Run the code above in your browser using DataLab