I have a .csv
file where columns 2
and beyond are dollar amounts such as $1004.23
, ($1482.40)
, $2423.94
, etc. Similar to the example below:
id desc price
0 apple $1.00
1 banana ($2.25)
2 grapes $1.97
When I bring in this file using the below command, all of my numbers get rounded so $1.00
becomes $1
and ($2.25)
becomes ($2)
.
df <- read.csv(file.path(path = path, file = "filename"), header=TRUE, sep=",", stringsAsFactors=FALSE, dec=".")
I've tried it without the dec="."
option to no avail.