Auto-detect R data frame column data types

Here is how to auto-detect and change data types for multiple columns in R at the same time.

My dataset looks like this.

The first line contains unnecessary information, but even if I remove that, column data types stay the same.

There is an easy way to change that with type_convert function from the readr package.

If you want to know how to reflow your code or other useful RStudio tips and tricks, take a look at this post.

0 comments on “Auto-detect R data frame column data types

Leave a Reply

Your email address will not be published. Required fields are marked *