acast and dcast are generics with data.frame method.