After importing a file, I always try try to remove spaces from the column names to make referral to column names easier.
Is there a better way to do this other then
Assign the names like this. This works best. It replaces all white spaces in the name with underscore.
names(ctm2)<-gsub("\\s","_",names(ctm2))