Convert Multiple Columns to Numeric or Character

Quick piece of code that turns all selected columns to numeric in R.

df[, c('col1', 'col2')] <- as.numeric(as.character(unlist(df[, c('col1', 'col2')])))

Mutating within tidyverse is always a good options as well.

df %>%
  mutate_at(vars('column1', 'column2'), as.character)

Bo\(^2\)m =)