Get startedGet started for free

Tests for two groups

Besides looking at associations between two or more continuous numeric variables, it is also useful to look for associations between a continuous numeric variable and a group variable, such as between abalone length and the dichotomous adult variable in abaloneKeep.

To look at this relationship, in this exercise, you will perform a t-test to determine if there a difference in abalone lengths between infants and adults.

The abaloneKeep dataset, dplyr and ggplot2 packages have been loaded for you.

This exercise is part of the course

R For SAS Users

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Get n, mean, sd for length by adult groups
abaloneKeep %>% 
  ___ %>%
  ___ %>%
  summarise(across(everything(), list(___ = ~ mean(.x),
                                      ___ = ~ sd(.x))),
            N = ___)
Edit and Run Code