I'm trying to remove numeric columns with sd=0, and this error "Error: memory exhausted (limit reached?)" pops up, my "data" was read with fread.
data2 <- data[ - as.numeric(which(apply(data, 2, var) == 0))]
Error: memory exhausted (limit reached?)
Is there a way around this?