I have a data.frame that contains a column with strings of numbers
complete_code iris
1 774680203 0203
2 774950102 0102
3 772800000 0000
4 774680206 0206
5 770140104 0104
6 771230000 0000
I want to save it as a .csv file with
write_csv
but when I load it again, I get
> read_csv("file.csv", col_names = TRUE, cols (complete_code = col_character(), iris = col_character)
complete_code iris
<dbl> <dbl>
1 774680203 203
2 774950102 102
3 772800000 0
4 774680206 206
5 770140104 104
6 771230000 0
I am therefore losing the first "0" on my string of numbers. I tried using the col_types
arguments but can't seem to keep all the "0" in my data set.
Do you have a method that could help me? Thanks