1

I am using the plyr package to process lists and data frames. I have noticed the following behaviour:

Example 1 -

list_2 <- llply(list_1, function_1, .progress='text')

this works as expected. It generates list_2 from list_1 with function_1 applied to each list_1 element and I see the progress bar.

Example 2 -

list_3 <- dlply(list_2, function_2, .progress='text')

this also works insofar as I get the results in list_3 that I expect, however, I do not get a progress bar.

In summary, why does the progress bar not work for dlply but works for llply. (It also works for ldply).

IRTFM
  • 258,963
  • 21
  • 364
  • 487
John
  • 41,131
  • 31
  • 82
  • 106

1 Answers1

7

Because you're not splitting your data.frame on anything. If your second example was:

list_3 <- dlply(df_2, .(colname2), function_2, .progress='text')

then it would work. The progress meter in plyr is based on the number of chunks completed.

Harlan
  • 18,883
  • 8
  • 47
  • 56