Dataset used in this question is "Wage" from ISLR package
library(ISLR)
head(Wage)
year age maritl race education region jobclass health
1 2006 18 1. Never Married 1. White 1. < HS Grad 2. Middle Atlantic 1. Industrial 1. <=Good
2 2004 24 1. Never Married 1. White 4. College Grad 2. Middle Atlantic 2. Information 2. >=Very Good
3 2003 45 2. Married 1. White 3. Some College 2. Middle Atlantic 1. Industrial 1. <=Good
health_ins logwage wage
1 2. No 4.318063 75.04315
2 2. No 4.255273 70.47602
3 1. Yes 4.875061 130.98218
3rd column to 9th column contains unwanted characters (first element) such as 1. or 2.
How to remove all unwanted characters and numbers for all mentioned columns