Re: [R] Remove part of string in colname and calculate mean for columns groups

2010-01-15 Thread Dieter Menne
Joel Fürstenberg-Hägg wrote: > > > > I have two question. First, I wonder how to remove a part of the column > names in a matrix? I would like to remove the "_ACCX" or "_NAX" part > below. Is there a method where the "_" as well as all characters after i > can be removed? > > Secondly, I wou

[R] Remove part of string in colname and calculate mean for columns groups

2010-01-15 Thread Joel Fürstenberg-Hägg
Hi all, I have two question. First, I wonder how to remove a part of the column names in a matrix? I would like to remove the "_ACCX" or "_NAX" part below. Is there a method where the "_" as well as all characters after i can be removed? > dim(exprdata) [1] 88 512 > > colnames(exprdat