Change to dbl after import csv created factor

One main difference is that read.csv converts character vectors to factors by default, and it can be changed using stringsAsFactors argument. Also, the characters considered as missing values vary, as read_csv considers (quite correctly) "" as NA by default, along with "NA".

I haven't checked your reprex, but noted that adding stringsAsFactors = False for data1 generates same warnings. I don't know purrr (I'm still learning), and hence can't understand what you're trying to do. I hope others will answer your question.


On a separate note, please familiarise yourself with this post:

1 Like