Reputation: 237
I want to prefix all variable names in a data frame with b_.
b_
Any ideas how to do this I can't find any similar questions or advice out there.
Upvotes: 1
Views: 2102
Reputation: 56189
Try this:
colnames(df) <- paste0("b_",colnames(df))
Upvotes: 3