Hi , I have got two character columns and I want to sort it according to specific order:
data1 <- structure(list(Arthritis = c("No", "No", "Yes", "Yes"), Soccer_type = c(
"Elite",
"Non_Elite", "Elite", "Non_Elite"
), N = c(61L, 206L, 10L, 9L)), class = c(
"grouped_df",
"tbl_df", "tbl", "data.frame"
), row.names = c(NA, -4L), groups = structure(list(
Arthritis = c("No", "Yes"), .rows = structure(list(1:2, 3:4), ptype = integer(0), class = c(
"vctrs_list_of",
"vctrs_vctr", "list"
))
), class = c("tbl_df", "tbl", "data.frame"), row.names = c(NA, -2L), .drop = TRUE))
It looks like this:
I want it to look like this:
How do I do it, please, ?