LoslegenKostenlos loslegen

Dataset contents

In this exercise you will learn how to view information and subsets of the abalone dataset. You will use the head() and tail() to view the top and bottom 3 rows of the dataset. You will also arrange the abalones by their number of rings.

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

Diese Übung ist Teil des Kurses

R For SAS Users

Kurs anzeigen

Anleitung zur Übung

  • View top and bottom 3 rows of the abalone dataset.
  • Using the arrange() function from the dplyr package, sort the abalones by number of rings.
  • Rewrite the arrange line of code above using the dplyr pipe %>% operator.

Interaktive Übung

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

# View top 3 rows of abalone dataset using head()
head(___, ___)

# View bottom 3 rows of abalone dataset using tail()
tail(___, ___)

# Run arrange function from dplyr to sort the data by rings
arrange(___, ___)

# Rewrite the line of code above using the %>% notation
___ %>% 
  ___
Code bearbeiten und ausführen