# NOT RUN {
# x subset of y
x = c("b", "a", "c", "d")
y = letters
reorder_vector(x, y)
# y subset of x
y = letters[1:3]
reorder_vector(x, y)
reorder_vector(x, y, na_last = TRUE)
reorder_vector(x, y, na_last = FALSE)
# }
Run the code above in your browser using DataLab