I would like to rename all my columns in a dataframe by a specific pattern.
My input:
Log.NE122 Log.NE244 Log.NE144 -0.33 0.98 1.0
You can use regular expressions to change the colnames() of an object. Here I'm replacing the Log. with nothing:
colnames()
colnames(object) <- sub("Log\\.", "", colnames(object))