I'm trying to replace extreme values with the nearest value in the dataset. I know the ifelse () works better, but just wondering why is the for loop not working. I'm trying to replace extreme values with the n
I'm trying to replace extreme values with the nearest value in the dataset. I know the ifelse () works better, but just wondering why is the for loop not working. I'm trying to replace extreme values with the n