Update ddply statement to account for removed attach() statement.