changed import(plyr) to importFrom(plyr, ddply)