Why can\'t one have multiple variables passed to value.var in dcast? From ?dcast:
value.var name of column whi
I had the same issue and I found this answer: Error using dcast with multiple value.var that suggests to "force" data.table dcast function as follows:
# multiple value.var
data.table::dcast(Cars93, AirBags ~ DriveTrain, mean, value.var=c("Price", "Weight"))
I was able to cast multiple variables without error.