Skip to content
Back to formatted view

Raw Message

Message-ID: <5108D668.102@ymail.com>
Date: 2013-01-30T08:14:32Z
From: Pascal Oettli
Subject: Programmatically give file name to a matrix
In-Reply-To: <CABK368jAtBk2Xrq2THhpm=qfAMA4pfKjKD2LGz7z1x+B074OmQ@mail.gmail.com>

Hello,

?assign

assign(paste("plotroc_GBM_Trn_", i, sep=""), matrix(rnorm(100),10,10))

HTH,
Pascal


Le 30/01/2013 17:04, Kumar Mainali a ?crit :
> I have a situation when I need to save matrix with file names that are
> programmatically created.
>
> for (i in levels(mergeTrn$Continent)) {
>          matrix here....
>
> # I want to save this matrix with a file name that carries "i" from for
> loop. The following does not work.
> paste("plotroc_GBM_Trn_", i, sep="") <- matrix
>
> }
>
> Thanks,
> Kumar
>