Hacker News new | ask | show | jobs
by craigching 4284 days ago
> But reshape2::melt() requires a separate argument (factorsAsStrings) if you don't want automatic conversion, and with plyr::ldply() you can't prevent the index column conversion to a factor at all. So factors creep in periodically into my data frames and burns me every now and then.

Oh, wow, thanks for that. I generally prefer data.table to plyr, but I do use reshape2 of course so that's great to know.

1 comments

It's worth taking a look at `dplyr`. You can work with data tables or data frames (or a database), and the functions are in the same neighborhood as data.table functions in terms of speed. Also, in addition to `reshape2`, there is `tidyr`.
Yep, I know about dplyr, I plan on spending some more time with that. Thanks for the 'tidyr' reference, I haven't heard of that one yet and will check it out!