I have upgraded the latest version of R 6.3.1. I have tried to import a large .csv file which contains both numeric and string data. I have noticed that the numeric data does not seem to import correctly. The decimal places in R do not appear to be correct. For example: Outstanding Balance Column.
If I sum this column in Excel I get the following result 167050951793.0550000
When I sum the same Column in R I get the following result 167050951792.9998
I have Excel 365. I saved the Excel file as .csv. Before doing so I converted all the number fields to numeric format with 2 decimal places
- I have prepared the data in Excel.
- Before saving the file as CSV format I converted all numeric fields to number format with 2 decimal places.
- I import the data into R using the import (rio package)
IMPORT RAW DATA
library(rio)
data = rio::import("C:/Users/Manfred Kuhn/Documents/Rwanda IFRS 9 Data/IFRS data sets/Final Data Sets/RWANDA_JUL19_FINAL_REMEDIATEDv6.csv",integer64 = "double")
I have a column called OS_Balance (meaning outstanding balance) expected result (as formatted in excel)
1.00
1.00
1.00
1.00
1.00
1.00
1.00
actual result
1.00
1.00
1.00
1
1
1
1
When I export the data, the data is exported without any decimal places