I have data that looks as the following:
dt <- data.frame(id = sample(LETTERS, 100) ,A = seq(1:100), B = sample(1:100000, 100), C = rpois(100,1), D = seq(1:100)^3)
I am trying to transform any variable that has a max value > 1000
dt %>% mutate_if(max(.) > 1000, log10)
For model fitting. But I keep getting the following error:
Error in tbl_if_vars(.tbl, .p, .env, ..., .include_group_vars = .include_group_vars) :
length(.p) == length(tibble_vars) is not TRUE
Please help!