[ADMB Users] "for" looping or "trans" (transpose) operation fails in REPORT_SECTION

Saang-Yoon shyunuw at gmail.com
Tue May 31 17:01:56 PDT 2011


Dear Drs. Fournier and Bence.
Thank you very much for your comments and help.  Now I solved my
problem.  Best,
Saang-Yoon

On May 30, 8:58 am, "James R. Bence" <be... at msu.edu> wrote:
> Saang-Yoon
>
> I am not sure whether your code attempting to use looping and tran in
> report section failed or you are just wondering if it is possible.  There
> should be no problem doing this in the report section.  For example the
> following code added to report section of "catage.tpl" example distributed
> with admb works fine:
>
>   report << "Transposed F table " << endl;
>    report << trans(F)<<endl;
>    int i,j;
>    for (i=1;i<=nyrs;i++)
>      for (j=1;j<=nages;j++)
>      {
>        {
>        if (i==1 & j==1) report<<"Year "<< "Age " << " F   " <<  " N  "<<endl;
>        report <<i <<"    "<<j<<"     "<<F(i,j)<<"   " << N(i,j)<<endl;
>
> Jim
>
> At 10:22 PM 5/28/2011, Saang-Yoon wrote:
>
> >Hello.
> >I wonder about whether REPORT_SECTION allows "for" looping or "trans"
> >operation (i.e., transpose).  I would like to arrange outputs from
> >REPORT_SECTION in a vertical or horizontal way.  Of course, I could
> >arrange them  in the way of my preference before the section, and then
> >put them in the section.  But I suspect that advanced ADMB users may
> >be able to do so in REPORT_SECTION.   Thank you,
> >Saang-Yoon
> >_______________________________________________
> >Users mailing list
> >Us... at admb-project.org
> >http://lists.admb-project.org/mailman/listinfo/users
>
> Jim Bence
> Dept. of Fisheries and Wildlife
> Michigan State Universityhttp://www.msu.edu/user/bence/
>
> _______________________________________________
> Users mailing list
> Us... at admb-project.orghttp://lists.admb-project.org/mailman/listinfo/users



More information about the Users mailing list