ddplyをPOSIXltを含むデータフレームに適用した場合のエラーについて

ddplyをPOSIXltを含むデータフレームに適用すると以下のようなエラーが出ることがある。

Error in attributes(out) <- attributes(col) : 
  'names' attribute [9] must be the same length as the vector [1]

対処法としては2つ。

  1. POSIXltをas.characterで文字列に変換する
  2. POSIXltの代わりにPOSIXctを使う(plyrパッケージ作者のHadley推奨)

参照
http://stackoverflow.com/questions/14153092/meaning-of-ddply-error-names-attribute-9-must-be-the-same-length-as-the-vec