search for: matman

Displaying 1 result from an estimated 1 matches for "matman".

Did you mean: manman
2009 Jun 18
2
How to change ONLY the first character of each variable name
Dear R-helpers, I would like to adapt the following code > names(data)<-sub("M","MOLE",names(data)) which changes any occurrence of "M" (in my variable names) to "MOLE" such that it ONLY operates on the first character of each variable name, i.e. M will only be changed to MOLE if it's the first character of a variable. I would appreciate any