use functions instead of symbols for by and colwise