Exercises

  1. Can you think of ways in which we can extract a few attributes (columns) and observations (rows) based on a certain condition?
  2. Can we add multiple arguments within a function in the apply family? If yes, what is the syntax for assigning multiple arguments?
  3. A general notion states that for loops are slower than the apply functions. Is it true or false? If false, what are the conditions in which the notion gets negated?
  4. Define ADT for calculating the area of any geometrical object, such as a circle, square, ...

Get R Data Structures and Algorithms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.