Use Im
function to extract the imaginary part and sort it.
roots <- polyroot(c(5, 4, 3, 2, 1))
#[1] 0.287815+1.416093i -1.287815+0.857897i -1.287815-0.857897i
#[4] 0.287815-1.416093i
roots[order(Im(roots))]
#[1] 0.287815-1.416093i -1.287815-0.857897i -1.287815+0.857897i
#[4] 0.287815+1.416093i