[ADMB Users] Integrating R and ADMB to generalize TPL files

Jeff Laake jefflaake at gmail.com
Tue Oct 30 18:54:44 PDT 2012


I agree and R2admb makes that possible. Posted the example to show how
model.matrix can be used to help generalize the tpl and automate the model
generation process.  Presumably reading in text files isn't too slow. Is
there an option to read in binary files if there is a large amount of input
data?   regards --jeff

On Tue, Oct 30, 2012 at 5:15 PM, H. Skaug <hskaug at gmail.com> wrote:

> Jeff,
>
> I will not judge what is right or wrong, but here are my simple preferences
> over the past 10 years:
> 1. Communicate between R and ADMB via textfiles, e.g. R2admb
> 2. Do as much as possible of the pre and post processing in R. Hence
>    model.matrix() belongs on the R side.
>
> Hans
>
> On Tue, Oct 30, 2012 at 5:37 PM, Jeff Laake <jefflaake at gmail.com> wrote:
> > I'm a newbie at ADMB but have been using R for over a decade. Coming
> from R
> > my inclination was to integrate R and ADMB and I found the R2admb package
> > that Ben Bolker wrote. That package makes it quite easy to use R in
> > constructing TPL files and drive model development from R rather than
> > editing TPL in an IDE or text editor. In particular, I'm using
> model.matrix
> > in R to create design matrices that are input as DATA into ADMB. This
> means
> > a basic TPL file can be used without modification to run any number of
> > models directly from R.  I mentioned this to a colleague who said that
> his
> > biggest complaint about ADMB was it's lack of tools such as model.matrix.
> > When I showed him my approach he suggested that I post a message to the
> user
> > list as others may be interested as well. The following link
> > https://github.com/downloads/jlaake/R2admb/Intro_to_r2admb.pdf  will
> take
> > you to a pdf that shows a couple of examples. The first shows how to
> extend
> > simple.tpl to fit any model and the second more useful example fits
> > detection curves to line transect data. The code for these examples is at
> > https://github.com/jlaake/R2admb/tree/master/Intro%20to%20R2admb
> >
> > I'd appreciate getting any comments about its usefulness (or not) and my
> > admb programming which I'm still learning, I believe that integration of
> > admb into R (as in glmmADMB) will help make ADMB more mainstream in
> ecology
> > and other fields.
> >
> > regards --jeff laake
> >
> > _______________________________________________
> > Users mailing list
> > Users at admb-project.org
> > http://lists.admb-project.org/mailman/listinfo/users
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20121030/b96e2dba/attachment.html>


More information about the Users mailing list