I have a tidy tibble.
Tibble <- data.frame(Doc_ID = c(1, 9, 9, 67),
Compartment = c("Car", "Truck", "Bus", "Plane"),
Count = c(3, 2, 1, 5))
I need to extend it back to its original form.
Result <- data.frame(Doc_ID = c(1,1,1,9,9,9,67,67,67,67,67),
Compartment = c("Car","Car","Car","Truck","Truck","Bus",
"Plane","Plane","Plane","Plane","Plane"))
Does the tidy()
function have an opposite function?