Update your browser or use a newer device. We no longer support this version, so parts of Varsity Tutors may not work.
Dismiss
R Programming Quiz
10 questions · no time limit
0:00
Finish quiz
DATA STRUCTURES IN R
Question 1
of 10
Flag for review
No time limit
Current
Answered
Flagged
Not seen
Suppose
d
is created as follows:
d <- data.frame(code = c('x', 'y', 'z'), score = c(4, 7, 9))
Which statement about extracting data from
d
is correct?
A
d[2]
returns a one-column data frame containing the
score
column.
B
d[, 2]
returns a one-column data frame containing the
score
column.
C
d[[2]]
returns a one-column data frame containing the
score
column.
D
d[2, ]
returns the second column as an atomic vector.
YOUR PROGRESS
10
QUESTIONS
Ready when you are
Answer in any order. Your progress shows here as you go.
QUESTIONS
1
2
3
4
5
6
7
8
9
10
KEYBOARD
Pick an answer
A
B
C
D
Next question
↵
→
Previous
←
Flag for review
F