my data is like: -3+2 41-12 after separating each part by using the following code: eg.
text = \'-3+2\'
pattern = \'-?\\\\d+\' matches = gre
or from your list, after parsing:
sapply(a, function(x) sum(as.numeric(x)))