1. 학습
  2. /
  3. 강의
  4. /
  5. Writing Efficient R Code

Connected

연습 문제

Row timings

Similar to the previous example, the objects mat and df are a matrix and a data frame, respectively. Using microbenchmark(), how long does it take to select the first row from each of these objects?

To make the comparison fair, just use mat[1, ] and df[1, ].

지침

100 XP

The microbenchmark package is already loaded in your workspace.