Closed pcaillou closed 9 years ago
Well. Yes. The specs of the CSV format are VERY fuzzy. And the regular CSV pattern (if
such a thing exists) recognizes space as a separator… However, I added, some time ago,
for the purpose of saving the population browser, a nice and simple CSV library.
I have committed a version that uses their CSVReader. Can you check it ? I have no
time to do it right now, so tell me if it works better. To enable it, I have added
a very simple operator "as_csv", that, applied to a text file, can take a string in
argument specifying the separator to use. You can test it like this :
file data <- file('../includes/mat.csv') as_csv ";"; (or as_csv "," if you want the
comma to be used).
and you can do the regular things (matrix, etc. ) normally after. If no separator is
provided, then the old algorithm is used (in order not to break models).
If you assess this solution, please close the issue.
Original issue reported on code.google.com by alexis.drogoul
on 2013-09-16 19:41:08
Any (good) news ? I will soon freeze the configuration of GAMA for the 1.6 release and
need to know whether or not to include this patch.
Original issue reported on code.google.com by alexis.drogoul
on 2013-09-17 03:44:33
(No text was entered with this change)
Original issue reported on code.google.com by alexis.drogoul
on 2013-09-17 08:06:47
OK. I close this one since the introduction of the as_csv operator seems to help dealing
with ambiguous CSV files (where several "official" separators coexist).
Original issue reported on code.google.com by alexis.drogoul
on 2013-09-17 11:29:21
Original issue reported on code.google.com by
benoit.gaudou
on 2013-09-16 13:51:24