Splitt a data frame by median

Hi,
I would like to divide my data based on the median into high and low, I want it to be in one column.

df ← data.frame(salary = c(623.3,515.2,611.0,729.0,843.25), stringsAsFactors = FALSE)
sala