I have a data frame like;
dataframe <- data.frame(country=c("Japan","Korea","China","Japan","Korea","China","Japan","Korea","China"),
count=c(4,5,6,1,2,3,0,2,3))
Now I want to sort by the country like;
dataframe <- data.frame(country=c("Japan","Japan","Japan","Korea","Korea","Korea","China","China","China"),
count=c(4,1,0,5,2,2,6,3,3))
I tried grouped_by function, but it doesn't work. Please tell me how to do.