LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

R For SAS Users

Kurs anzeigen

Interaktive Übung

Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.

# Get n, mean, sd for length by adult groups
abaloneKeep %>% 
  ___ %>%
  ___ %>%
  summarise(across(everything(), list(___ = ~ mean(.x),
                                      ___ = ~ sd(.x))),
            N = ___)
Code bearbeiten und ausführen