Safely Convert Character Columns to Numeric Type
convert_numeric_cols.Rd
This function inspects each column of a data frame. If a character column contains only values that can be interpreted as numbers (including integers, decimals, scientific notation, and the strings "NA" or "NaN"), it converts that entire column to the numeric type. Columns containing non-numeric text are left unchanged.