At first, all imported columns are characters/strings. But of course, most data in the columns are numeric values. This function makes an educated guess to find all columns that contain numeric values.

convert_columns_to_numeric(df)

Arguments

df

dataframe

Value

dataframe

Details

This is done in several steps:

  • make all values to label missing values NA

  • set decimal marks to .

  • guess which colums should be numeric by setting as.numeric if there are no A-z characters in the column