0
0
R Programmingprogramming~10 mins

Why data loading is the first step in R Programming - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to load a CSV file into R.

R Programming
data <- read.csv([1])
Drag options to blanks, or click blank then click option'
Adata.csv
Bread.csv
Ccsv.read
D"data.csv"
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting quotes around the filename
Using incorrect function names
2fill in blank
medium

Complete the code to check the first few rows of the loaded data.

R Programming
head([1])
Drag options to blanks, or click blank then click option'
Adata
Bread.csv
Ccsv
Dfile
Attempts:
3 left
💡 Hint
Common Mistakes
Using the filename instead of the data variable
Using function names instead of variables
3fill in blank
hard

Fix the error in the code to load a CSV file with headers.

R Programming
data <- read.csv("data.csv", [1] = TRUE)
Drag options to blanks, or click blank then click option'
Aheader
Bheaders
Chead
Dheader_row
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural 'headers'
Using incorrect argument names
4fill in blank
hard

Fill both blanks to load a CSV file and view its structure.

R Programming
data <- [1]("data.csv", header = TRUE)
str([2])
Drag options to blanks, or click blank then click option'
Aread.csv
Bdata
Cdataset
Dread.table
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong function names
Using wrong variable names
5fill in blank
hard

Fill all three blanks to load data, check its summary, and view the first rows.

R Programming
data <- [1]("data.csv", header = TRUE)
summary([2])
head([3])
Drag options to blanks, or click blank then click option'
Aread.csv
Bdata
Cdataset
Dread.table
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names inconsistently
Using wrong function names