# Print recasted dataset using cast() function
cast.data <- cast(molten.data, n~variable, sum)
print(cast.data)
cat("
")
time.cast <- cast(molten.data, time~variable, mean)
print(time.cast)
n x y
1 1 9 5
2 2 7 15
time x y
1 1 4 3.5
2 2 4 6.5