Aan de slagGa gratis aan de slag

Create new variables

In the next exercises you will modify the abalone dataset. Your first step is to create abaloneMod as a copy of the original dataset abalone which is always good practice to ensure the original dataset is not modified.

Specifically in this exercise, you will use the dplyr::mutate() function to add four new variables to abaloneMod. At the end of the exercise, you will run summary() to check the new variables. Notice the maximums for the new percentages computed.

The abalone dataset and dplyr package have been loaded for you.

Deze oefening maakt deel uit van de cursus

R For SAS Users

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Create abaloneMod from abalone, add new variable age
abaloneMod <- ___ %>%
  mutate(___)
Code bewerken en uitvoeren