Skip to content
Prev 318151 / 398503 Next

assign index to colnames(matrix)

Jim, thank you, that worked great.

Paul Prew  |  Statistician
651-795-5942?? |?? fax 651-204-7504 
Ecolab Research Center  | Mail Stop ESC-F4412-A 
655 Lone Oak Drive  |  Eagan, MN 55121-1560 

-----Original Message-----
From: Jim Lemon [mailto:jim at bitwrit.com.au] 
Sent: Friday, February 22, 2013 7:22 PM
To: Prew, Paul
Cc: r-help at r-project.org
Subject: Re: [R] assign index to colnames(matrix)
On 02/23/2013 11:34 AM, Prew, Paul wrote:
Hi Paul,
You don't really need the loop, try:

colnames(ScoutRSM.mat)<-paste("X",1:dim(ScoutRSM.mat)[2],sep="")

Jim

CONFIDENTIALITY NOTICE: 
This e-mail communication and any attachments may contain proprietary and privileged information for the use of the designated recipients named above. 
Any unauthorized review, use, disclosure or distribution is prohibited. 
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.