Опция с использованием dplyr
library(dplyr)
df %>% group_by(Client) %>% summarise_at(vars(TC:CA), function(x) sum(x))
# Client TC CC CA
#1 654 2 1 0
#2 666 0 0 1
#3 667 0 1 0
Данные
df <- structure(list(Product = structure(c(3L, 3L, 2L, 1L, 2L), .Label = c("CA",
"CC", "TC"), class = "factor"), Client = structure(c(1L, 1L,
1L, 2L, 3L), .Label = c("654", "666", "667"), class = "factor"),
TC = c(1, 1, 0, 0, 0), CC = c(0, 0, 1, 0, 1), CA = c(0, 0,
0, 1, 0)), .Names = c("Product", "Client", "TC", "CC", "CA"
), row.names = c(NA, -5L), class = "data.frame")