Good day. I am trying to impute NA values in my dataset. I have 600 peptide variables. Each peptide variable has NA values. The following syntax was able to impute the NA values with the minimum of each peptide variables data, but I need to impute the NA value with the minimum divided by 2 (min/2) (therefore, not only the minimum).
Syntax that I wrote:
group.imp <- group1 %>% impute_at(.na=na.min, .vars=379:975)
If I tried to divide the min by 2 (see below), but then it gives an error of: "non-numeric argument to binary operator":
group.imp <- group1 %>% impute_at(.na=na.min/2, .vars=379:975)
Is there anyway that I can impute the NA values of each variable with the minimum of each peptide variable divided by 2?