I have some values such as -77777 which denote a special type of missing info in my dataset. I want to replace these with the smallest value or the largest value in their own column. Say I'm working with dataset HLDE and column is RTLM.
HLDE <- data.frame(RTLM = c(0:9, -77777))
This is not a duplicate! The so-called duplicate has no resemblance.