Create new column based on partial string matching of other column (several patterns) R : In the post http://stackoverflow.com/questions/19747384/how-to-create-new-column-in-dataframe-based-on-partial-string-matching-other-col there is the answer to this question, but I am not able to apply it to my data. 

The problem is that in the column "Fertiliser" (strings) the amount of different types of fertiliser. The third number refers to manure. I want to create a new column which only the amount of manure (so then I can do regression analysis against yield).

`Fertiliser millet_biomass millet_yield
 1:      0-0-0       2659.608     710.6942
 2:    0-0-100       2701.044     718.1154
 3:   0-0-2700       3415.879     804.0360
 4:    0-0-300       2781.639     730.5943
 5:    0-0-900       2997.173     760.0136
 6:     12-4-0       3703.255     772.1719
 7:   12-4-100       3720.247     773.1759
 8:  12-4-2700       3950.189     788.6133
 9:   12-4-300       3751.400     775.1368
10:   12-4-900       3826.693     780.2623
11:    30-10-0       4180.323     798.2134
12:  30-10-100       4184.229     798.4918
13: 30-10-2700       4217.044     800.9312
14:  30-10-300       4187.014     798.6570
15:  30-10-900       4194.873     799.2085
16:      6-2-0       3296.274     765.8496
17:    6-2-100       3326.844     767.6693
18:   6-2-2700       3772.058     785.4535
19:    6-2-300       3381.152     760.7330
20:    6-2-900       3517.515     768.3018
21:    90-30-0       4542.924     831.2832
22:  90-30-100       4543.036     831.3983
23: 90-30-2700       4545.037     831.3227
24:  90-30-300       4543.240     831.3921
25:  90-30-900       4543.733     831.3727`

Thus, there are five patterns patterns "-0$","-100$","-300$","-900$","270$", 

which need to be replaced by "0", "100","300","900","2700"

I appreciate any help.

