If your variable data1$c
is a factor, it's more efficient to change the labels of the factor levels than to create a new vector of characters:
levels(data1$c) <- sub("_", "-", levels(data1$c))
a b c
1 0.73945260 a A-B
2 0.75998815 b A-B
3 0.19576725 c A-B
4 0.85932140 d A-B
5 0.80717115 e A-C
6 0.09101492 f A-C
7 0.10183586 g A-C
8 0.97742424 h A-C
9 0.21364521 i A-C
10 0.02389782 j A-C