[R] Naming output file
Steven Yen
@tyen @end|ng |rom ntu@edu@tw
Mon Jun 24 15:23:11 CEST 2024
Thanks to all. Editing the line to the following worked:
ame<-ame.bopa(get(paste0("bop",im)),y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE,
printing=FALSE,testing=TRUE)
On 6/24/2024 9:00 PM, Ivan Krylov wrote:
> В Mon, 24 Jun 2024 20:16:46 +0800
> Steven Yen <styen using ntu.edu.tw> пишет:
>
>> In the call to ame.bopa in a loop, I like inputs in the call to
>> ame.bopa to be bop1, bop2, bop3,... Thanks.
>>
>> for (im in 1:m) {
>> ame<-ame.bopa(bop,y1.level=y1value,y2.level=y2value,jindex=jindex1,vb.method="invH",joint12=TRUE,
>> printing=FALSE,testing=TRUE)
>> }
> Use get(paste0('bop', im)) to read a variable named paste0('bop', im).
>
> If you used a list like suggested by Rui, you would be able to use the
> same syntax for read and write access, namely, bop[[im]], instead of
> manually assigning variables using assign(name, value) and manually
> reading variables using get(name).
>
More information about the R-help
mailing list