Load external dataset
In this exercise you will read in the abalone.csv dataset which is in CSV (comma separated values) format using the read_csv() function from the readr package. You will first need to load the readr package. The abalone.csv dataset has 4177 rows and 9 columns which include sex, size and weight measurements of abalones. Learn more about the abalone.csv dataset.
Cet exercice fait partie du cours
R For SAS Users
Instructions
- Load the
readrpackage using thelibrary(packagename)function. - Create a dataset object called
abaloneby assigning the output<-from dataset imported using theread_csv()function from thereadrpackage. - Check that the number of rows and columns for the
abalonedataset are correct, using the dimensiondim()function. - List the variables names in the
abalonedataset.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Load the readr package
library(___)
# Load abalone.csv dataset assign output to abalone
abalone <- readr::read_csv(___)
# Get the dimensions of the abalone dataset object
___
# Get variable names in the abalone dataset object
___