Hi I have a dataframe like this
Start <- c("A")
End <- c("C")
Days <- c("Day1")
df2 <- data.frame(Start,End,Days)
I am trying to use dcast
df2 <- dcast(df2,Days ~ End,value.var="Days")
but it returns is
Days C
1 Day1 Day1
My desired output is the count
Days C
1 Day1 1
What am I missing here? Kindly provide some inputs on this. Is there a better way to do this using dplyr?