Replace 'all.*' functions with '.by.row' functions