This seems to be the easiest thing to do - I've really tried everything that I have found and nothing has worked well for me.
I have a very simple vector of fractions like this:
x = c(1/2,5/2,7/2)
I want to convert the values in this vector to decimals.
I tried what I found in this question, but it converted my fractions into simple numbers that had been rounded like c(1,3,4)
I also tried a few libraries and same result...
One thing that I should mention is that my vector is a factor, but if I convert it to numeric or integer it converts the values as well into rounded numbers!
EDIT 1:
I'm not sure what's different about my particular vector. When I run the example vector I have in the question everything works fine. It actually auto evaluates it. I got my vector from a csv file but it doesn't seem like a character vector since the fractions are not in quotes when printing it.
EDIT 2:
It seems like the csv is treating the column as a date, but when I try to turn it into a number form manually within the csv, it doesn't really convert into the result of the fraction.
EDIT 3:
It seems like the example I provided does not completely represent my original data. If you would like to try a small sample of the real data you may download the csv here. Also, a dput of my data:
structure(c(14L, 13L, 4L, 5L, 8L, 7L, 3L, 8L, 11L, 1L), .Label = c("10/1",
"12/1", "15/1", "2/1", "3/1", "4/1", "5/1", "5/2", "6/1", "7/1",
"7/2", "8/1", "8/5", "9/2"), class = "factor")