O'Reilly logo

Learning Shiny by Hernán G. Resnizky

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

plyr

The logic of plyr is very similar to aggregate() and apply(). In fact, the title of the package is Tools for splitting, applying, and combining data.

Its main functions can be easily understood since they are all named for its input and output objects, based upon the following references:

  • d: This is for a data frame
  • a: This is for an array
  • l: This is for a list
  • m: This is for a data frame or an array (column-wise, only as input)
  • _: This is for a function's guess (only for outputs)

So, for instance, laply receives a list and returns an array, ddply receives a data frame and returns a data frame, and so on.

Although the package has a wide variety of functions available, all the ones that have a data frame as input are the most important ones (also, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required