# NOT RUN {
tmp <- data.frame(A = c('a','a','b','c', 'a')
B = c('V1', 'V1','V1','V2', 'V3')
C = c(10,20,30,40,50), stringsAsFactors = F)
tmp
# A B C
# 1 a V1 10
# 2 a V1 20
# 3 b V1 30
# 4 c V2 40
# 5 a V3 50
group.clonotypes(tmp, 'B', 'C', 'A')
# A B C
# 1 a V1 30
# 3 b V1 50
# 4 c V2 30
# 5 a V3 40
group.clonotypes(tmp, NA, 'C', 'A')
# A B C
# 1 a V1 80
# 3 b V1 30
# 4 c V2 40
# For tcR data frame:
data(twb)
twb1.gr <- group.clonotypes(twb[[1]])
twb.gr <- group.clonotypes(twb)
# }
Run the code above in your browser using DataLab