[R] regroup row names

lily li chocold12 at gmail.com
Sun Jul 3 20:14:42 CEST 2016


I have a problem in changing row names in a dataframe in R. The first
column is ID, such as aClim_st02, aClim_st03, aClim_st 05, bClim_st01,
bClim_st02, etc. How to rename the names, so that aClim_ all grouped to
aClim, while bClim_ all grouped to bClim? Thanks for your help.
df

ID                    temp   precip   LW   SW
aClim_st02
aClim_st03
aClim_st05
bClim_st01
bClim_st02
...

	[[alternative HTML version deleted]]



More information about the R-help mailing list