nerdexam
Dell-EMC

E20-007 · Question #110

What does the R code z <- f[1:10, ] do?

The correct answer is B. Assigns the first 10 rows of f to the vector z. See the full explanation below for the reasoning.

Question

What does the R code z <- f[1:10, ] do?

Options

  • AAssigns the 1st 10 columns of the 1st row of f to z
  • BAssigns the first 10 rows of f to the vector z
  • CAssigns a sequence of values from 1 to 10 to z
  • DAssigns the 1st 10 columns to z

How the community answered

(34 responses)
  • A
    15% (5)
  • B
    76% (26)
  • C
    6% (2)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full E20-007 Practice