Skip to content

Conversation

@MichaelChirico
Copy link

This is one step towards removing {plyr} (long superseded) as a dependency.

llply() is particularly simple since, besides use of arguments like .progress, it's effectively the same as lapply(), e.g.

lists <- list(
  # empty lists
  list(),
  setNames(list(), character()),
  list(NULL),
  list(a = NULL),
  # typical lists
  list(1, 2),
  list(a = 1, b = 2),
  # non-list coercion
  letters,
  setNames(letters, LETTERS),
  # list of non-atomic
  list(as.name('a')),
  list(b = as.name('c')),
  list(iris),
  list(b = iris)
)

for (l in lists) stopifnot(identical(plyr::llply(l, length), lapply(l, length)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant