It seems you want to categorise each entry by where its above or below the median. If thats the case this should point you towards a possible approach
(yourdata <- data.frame(tumorcode=letters[1:6],
total_perMb=(1:6)^2/1000))
library(tidyverse)
(solved <- mutate(yourdata,
above_median = total_perMb> median(total_perMb)))