Why are you using a loop in the first place? I'd use expand.grid
and by
to do the job:
comb = expand.grid(names(signature), names(signature)) # I fixed this line!
scores = by(comb,list(comb$Var1,comb$Var2), FUN=function(x) score(signature[[x[[1]]]],signature[[x[[2]]]]))
class(scores)="matrix"
scores