Data:
DB1 <- data.frame(orderItemID = 1:10,
price = c("12.90","8.90","Mrz 40","79.95","Dez 45", "7.99","Jun 90","129.90","Jul 90","49.95")
Expected Outcome:
DB1 <- data.frame(orderItemID = 1:10,
price = c("12.90","8.90","3.40","79.95","12.45", "7.99","6.90","129.90","7.90","49.95")
Hey guys, it´s me again ;) and unfortunately I have a pretty difficult problem in my data set I need to solve... As you can see above I have some correct an some incorrect prices. At the incorrect prices there are always letters instead of a numbers before the decimal point (and theres no decimal point at the wrong prices). The 3 letters are acronyms for months of the year. So for example Dez is 12. month of the year, so the correct number is 12. So that Dez 45 should become 12.45. 2.example: Jun is the 6.month of the year so the correct number is 6. So that Jun 90 should become 6.90. (Hope its clear what I mean)
So thats what I want to transform
Jan=1.
Feb=2.
Mrz=3.
Apr=4.
Mai=5.
Jun=6.
Jul=7.
Aug=8.
Sep=9.
Okt=10.
Nov=11.
Dez=12.
I really have no idea this time how to solve this problem...
Hope somebody got an idea