I need some help to sort a vector.
DB Query returns a vector as below:
condition_choices <- c("Good", "Very Good", "Fair", "Poor", "Very Poor", "Not Assessed", "Discontinued")
condition_order <- c("Very Good", "Good","Fair", "Poor", "Very Poor")
The desired order should be:
condition_choices_ordered <- c("Very Good", "Good","Fair", "Poor", "Very Poor","Discontinued", "Not Assessed")
This should be done in a dynamic way to put the missing condition_choices (not present in the condition_order) at the end of the vector (no specific order for the missing ones).