Coder Social home page Coder Social logo

pbs-admb's Introduction

PBSadmb: ADMB for R using scripts or GUI

© Fisheries and Oceans Canada (2008-2024)

The R package PBSadmb gives complete R support to the external program AD Model Builder (ADMB) released into the public domain in 2009. The program offers users a remarkably efficient tool for estimating parameters and their uncertainty, based on complex nonlinear statistical models.

In a standard ADMB installation, users would interact with the program via a DOS command shell (in Windows) or a bash shell (in Linux or Mac OS X). The package PBSadmb makes it possible to interact entirely from an R console, as a common interface for all operating systems. A single R script can encapsulate commands to ADMB, as well as all analyses that follow. The package includes protocols for writing code to make the integration between R and ADMB almost seamless.

PBSadmb also provides a Graphical User Interface (GUI) that facilitates the steps required for a complete ADMB analysis. Both new and experienced users can use the GUI for tutorial and educational purposes.

You can obtain PBSadmb from the Comprehensive R Archive Network (CRAN). Always use the current version of PBSadmb with the most recent version of PBSmodelling, another package available from CRAN.

PBSadmb represents just one of a series of R packages developed at the Pacific Biological Station (PBS) in Nanaimo, British Columbia. A more advanced version of PBSadmb might be available at pbs-software on GitHub. Any evolving package (Windows binary and source tarball) is built after using CRAN's rigorous R CMD check --as-cran routine (on a Windows 7 64-bit system) and posted to Google Drive. Most of the time, the revision on GitHub can be built in R using devtools::install_github("pbs-software/pbs-admb/PBSadmb"); however, not every revision has been checked for CRAN worthiness.

As with any freely available product, there is no warranty or promise that PBSadmb will perform adequately for all circumstances. Additionally, coding errors are possible, and users should contact the package maintainer if bugs are detected.

Maintainer: Rowan Haigh

DFO logo

pbs-admb's People

Contributors

haighr avatar docjon avatar

Stargazers

Alvaro Uzaheta avatar

Watchers

James Cloos avatar

pbs-admb's Issues

.callSys still not right

I've managed to get the call to '.callSys' working somewhat, but the 
return value of the shell command using shell(...) returns a 0 (no errors) 
which isn't compatible input to the 'writeLines' command argument 'text'. 
I'm not even sure what the function call is supposed to return anymore. 
Jon please Illuminate. I've had enough for now. The revision numer is 10 
but I have not rebuilt a new version.

Original issue reported on code.google.com by [email protected] on 13 Aug 2009 at 1:22

Warning about interactions between power saving options and long ADMB runs

Saang-Yoon Hyun has reported the error message:

Error in system(cmd, intern = intern, wait = wait | intern, 
show.output.on.console = wait, : 
    Impossible to create thread/pipe.

that sometimes occurs during long ADMB calculations. This error "seems to 
happen when a PC's screen automatically turns off for power saving purpose 
while the long calculations are being made. After setting power saving 
options to 'never' (never turning off), the error did not happen."

Original issue reported on code.google.com by [email protected] on 8 Oct 2009 at 8:06

cannot find -ldf1b2stub

What steps will reproduce the problem?
1. When I issue the LINK command from the GUI after successfully running the 
CONVERT and COMPILE operations 
2.
3.

What is the expected output? What do you see instead?
    I expect to generate an executible (e.g. vonb.exe) but get the above error mesage.  If I independently open a command window and simply type in the usual AD Model Builder commands: tpl2cpp vonb, adcomp vonb, and adlink vonb I generate an executible and it runs to the expected solution.

What version of the product are you using? On what operating system?
 Package: PBSadmb; Version: 0.61.44; Date: 2009-11-20
 I am using the Windows OS and R version 2.13.1

Please provide any additional information below.

    When the successful command-prompt run link is made the command line is:
 g++ simple.obj -static  -L"c:\admb10"\lib -ldf1b2o -ladmod -ladt -lado -ldf1b2o -ladmod -ladt -lado -o simple
    Using PBSadmb, the command shown in the R console shows:
 g++ -osimple.exe simple.o -Xlinker -s -L"c:/admb10/lib" -ldf1b2stub -ladmod -ladt -lads -ldf1b2stub -lads
   followed by the error lines:
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: 
cannot find -ldf1b2stub
c:/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: 
cannot find -ldf1b2stub
collect2: ld returned 1 exit status

      The premise to the program allowing seamless use of R functions when working with ADMB is great and I suspect this is a simple hiccup.  I tried to modify the adlink.bat file in the admb10/bin subdirectory but it became apparent that this wasn't used in the PBSadmb LINK.
                Thanks in advance for any help you can provide,
                                                                Mike


Original issue reported on code.google.com by [email protected] on 29 Aug 2011 at 10:21

Richer support for ADMB within PBSadmb

Mark Maunder made a number of creative suggestions for PBSadmb in the 
latter part of February, 2009. Although potentially difficult to 
implement, they involve more direct support for .dat, .pin, and .tpl files.

In a lengthy correspondence, I made this comment:

***** Comment

If I were developing a new project from scratch, I’d start by coding the 
posterior entirely in R. I could use R’s powerful debugging tools, notably 
the ability to display values of intermediate variables with “browser()”. 
This would also force me to think about data and parameters, probably 
collected as list objects. Once I knew that I had a well-defined posterior 
(with a known value at the initial point), I’d copy the R code into a text 
file and edit it until it becomes a proper ADMB template. In fact, I was 
planning to discuss this approach in a future version of the User’s Guide. 
Ideally, I’d like to have each example in the package accompanied with R 
code that replicates the calculations in the .tpl file.

This step could potentially be automated somewhat. Suppose that my R code 
takes the form of "objFun <- function(D,P) {...}", where D is a list 
object with the data and P is a list object with the parameters. Also, 
suppose that the code defines a particular data set D and an initial point 
P. Then a function (say, "convR2AD(objFun,D,P)" could write the .dat 
and .pin files, as well as generate a prototype .tpl text file that 
requires manual conversion from R code to C/C++.

***** End comment

After PBSadmb becomes more muti-lingual, we could give further 
consideration to these ideas.

Original issue reported on code.google.com by [email protected] on 10 Jul 2009 at 3:45

ADMB script support

Currently we use the object ADMBcmd to support ADMB scripts the convert, 
compile, and link (User's Guide, Appendix B). We did this because earlier 
versions of ADMB didn't always have the correct scripts and sometimes the three 
steps couldn't be run independently. (In effect, only "make" was available.)

Should we now revert back to the scripts that come with each distribution? This 
would probably give us less grief in the long run because we would rely on the 
scripts that come with each distribution.

We also need to think very carefully about how we depend on environment 
variables, particularly the path. I still like the idea of declaring paths in 
out GUI.

Original issue reported on code.google.com by [email protected] on 21 Sep 2010 at 9:33

Bug in compAD; concerns for not using native ADMB scripts

After a huge amount of work, I managed to track down the bug in convAD. As far 
as I can tell, the call to g++ is missing the -o argument to name the output 
file. 

I'm really concerned about the current approach of embedding DOS calls as 
hard-wired strings in the R code. The problem above would not have occurred if 
we had used the native scripts (adcomp.bat, adlink.bat) in the ADMB 
distribution. In the future, these scripts might change, and we'll have to 
revise our R code directly.

Obviously, calling the scripts should be much more generic across platforms and 
versions of ADMB. Maybe you were using the current code only as a trial.

Our method of compiling our own version of ADMB might prove essential, so that 
we can add missing scripts where needed. Strangely, the current binary version 
of ADMB posted for mingw actually does include the needed scripts. I'm still 
concerned that this might have happened because you didn't follow the latest 
instrucutions in their file ReadMe.txt, which actually does specify a configure 
step for Windows mingw. (See my further comment to issue #28.)

By the way, our current code (in linkAD) assumes that the object file has 
suffix .o. The latest ADMB scripts use .obj instead.




Original issue reported on code.google.com by [email protected] on 1 Feb 2011 at 3:39

Final check for r71

Although documentation is still incomplete, release 71 appears ready for all 
platforms: Windows (32 and 64 bit), Linux (32 and 64 bit), Mac OS (probably 
just 64 bit). Also, based on current instructions in the documentation files, 
we need to test builds of ADMB on all these systems.

I (JTS) have all of the above systems except Linux 64 bit. I'll try these 
experiments as I find time, but I'd appreciate help from Alex and Rowan in 
replicating these tests. We can use additional comments to this issue as a log 
of the tests that have been conducted by everyone.

Each of the above five systems has 3 steps in the testing phase:

1. Build ADMB from source.
2. Install ADMB and get it to work in the native OS.
3. Install PBSadmb and get it to work in R.

Step 3 potentially has two possibilites for R32 and R64.

The laws of combinatorics strike again!

Jon

Original issue reported on code.google.com by [email protected] on 31 Mar 2011 at 6:40

PBSadmb for Linux

The initial version of PBSadmb works only in Windows. Various system calls 
are tailored for this operating system and the g++ compiler that comes 
with Rtools for Windows.

As a start for Linux, Ian Taylor kindly modified the Windows R code to run 
on his version of Linux (see the attached three files). Thanks Ian! 

He accompanied his code with these comments:

"I was able to get the GUI working on my linux computer by making the 
modifications in the attached files. If you don't have a diff program to 
see the changes, let me know and I can spell them out for you. Mostly it 
was just changing "shell" to "system", and dealing with differences in 
unix vs. windows shell command syntax. The greatest trouble I had was with 
the compAD and linkAD functions. Among the changes that got these working 
was removing the use of .addQuotes, which is maybe representative of the 
tighter link between R and unix shell commands requiring fewer bits and 
pieces around the commands to make them work. I make no claims of great 
expertise, so there are surely better ways to do some of these things.

(Quote from Ian continued...) To make the "WD" button work, I used 
the "nautilus" command, which will work with the Gnome desktop on linux, 
but not KDE, which I'm less familiar with. I don't know if there's a more 
general command. I believe all of the differences between windows and R 
could be chosen using if statements if you preferred to have one bigger 
file rather than separate ones for the two systems. I don't know enough 
about PBSmodelling to know how hard that would be for the changes in the 
admbWin.txt file."

It remains to build this code into a Linux package that works reliably.

Original issue reported on code.google.com by [email protected] on 10 Jul 2009 at 3:14

Attachments:

Can't select paths from admb() GUI

In version 0.50.18 for Windows, I get the following errors when I try to 
select directories and files:

">" for ADM path:
Error in selectDir(usewidget = "admpath") : 
  unused argument(s) (usewidget = "admpath")

">" for GCC path:
Error in selectDir(usewidget = "gccpath") : 
  unused argument(s) (usewidget = "gccpath")

">" for Editor:
Error in selectFile(usewidget = "editor") :
  unused argument(s) (usewidget = "editor")

The "Set WD" button starts in the Desktop directory, not the current 
working directory.

Original issue reported on code.google.com by [email protected] on 28 Aug 2009 at 2:45

crashes R under OSX

library(PBSadmbwin)
setwd("/Users/alex/Documents/my_files/projects/dfo/admb_junk")
admb()
plotMC("vonb","dens", pthin=100,useCols=NULL) #this call crashes R


However, the following doesn't crash:
library(PBSadmbwin)
setwd("/Users/alex/Documents/my_files/projects/dfo/admb_junk")
plotMC("vonb","dens", pthin=100,useCols=NULL)

In both cases, the plots are displayed - and the end of plotMC is reached,
but R crashes just before returning to the console (when the GUI is displayed).

Original issue reported on code.google.com by [email protected] on 26 Aug 2009 at 5:24

Make generic PBSadmb

I've finally tested PBSadmbwin on Linux with a suitable installation of 
ADMB from the project web site. Things mostly work, although I've posted 
the previous two issues to report problems.

I think we should now make a new version of PBSadmb intended to work with 
all operating systems. It would require a separate installation of the 
ADMB package and an appropriate choice of path in the admb() GUI.

Once we fix a few bugs (and make a few changes to the User's Guide), we 
can post this version of PBSadmb on CRAN, because it will contain no 
binary libraries.

Original issue reported on code.google.com by [email protected] on 7 Sep 2009 at 7:42

admb() doesn't read ADopts.txt automatically in the current working directory

I thought that admb() would automatically read ADopts.txt if that file appears 
in the current working directory. But it doesn't.

I have a directory with a valid ADopts.txt file, but when I open admb() in that 
directory, I have to click the buttons "Load" and "Apply" to get the right 
paths in the GUI.

I think this applies to all operating systems.

Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 6:42

Output from admb() to the R console is incomplete in Linux

When running PBSadmbwin 0.50.20 in (Ubuntu 9.04) Linux, the output from 
the GUI doesn't bring the R console back to the "> " prompt. Instead, the 
user might see an empty rectangle.

If you type <Enter> when the R console is in scope, the prompt "> " 
finally appears, so it seems that a final newline (\n) must be missing.

This is not true in Windows, where the console always returns to the "> " 
prompt after a completed action in the admb() GUI.

I'm using "PBS Modelling 2.23.126".

Original issue reported on code.google.com by [email protected] on 7 Sep 2009 at 6:18

Failure in Windows with mingw

Following the instructions in "building beta from source", I installed the 
C/C++ compilers from mingw, as well as flex from GnuWin32. I also obtained ADMB 
10.0. Finally, with paths as described in Alex's instructions, I ran the command

mingw32-make --file=mingw.mak

in the src directory of ADMB. The build seemed to work, although it failed to 
put the relevant batch files (admb.bat, adcomp.bat, adlink.bat) in the bin 
directory of the compiled ADMB binary (as it should have).

I copied the binary of ADMB from ..\dists to a suitable location. I then used 
the latest version of PBSadmb with paths set appropriately in ADopts.txt. The 
"convert" phase worked, but the "compile" phase did not produce a ".o" file, 
even though the "compile" command generated no error messages in the R console.

Questions: (1) Why don't we use the "configure" step in the ADMB documentation? 
(2) Why don't the usual batch files appear in the ADMB bin directory? (3) Why 
does PBSadmb fail with this apparently valid ADMB installation? (4) Have I 
missed something in the steps above?

Original issue reported on code.google.com by [email protected] on 30 Jan 2011 at 8:31

Command prompt on the Linux terminal

To resolve issue #16, you added a final Linux prompt ">". Instead, the 
prompt should be "> ", with an extra space.

Now that I've become more familiar with the Linux version, I realize that 
issue #16 might not have been needed. It's more a matter of adjusting to 
how R works under Linux. But, given that we've added a fake command-line 
prompt, we should at least use the correct one: "> " (not ">", which looks 
rather strange to me).

Original issue reported on code.google.com by [email protected] on 23 Sep 2009 at 8:02

Problems with the installADMB GUI

The installADMB GUI makes a big improvement, but it also introduces some 
potential confusion. Most notably, the paths in the install GUI are _not_ the 
same as the paths in the Setup tab of the main GUI. A new user would rightly 
expect them to the same. As it stands, it seemed to me that although I had 
installed all the necessary packages, PBSadmb couldn't find the necessary gcc 
and ADMB files.

Suggestions: 

(1) In the install GUI, show the complete proposed paths (out to the parents of 
the bin directories).

(2) After installation, show the chosen paths in the Setup tab of the main GUI, 
so that the Apply button works.

Original issue reported on code.google.com by [email protected] on 15 Mar 2011 at 6:24

runMC requires the GUI (but it shouldn't)

A user, AC, reports that when he wants to use the script function 
'runMC' he has to start the GUI because the code complains that
'.PBSmod' doses not exist.

Looking at the existing code (below), there is a call to 'setWinVal' 
that shouldn't be there. (GUI interactions are supposed to be 
handled through wrapper functions (e.g. '.win.runMC').

Obviously, all script files need to be checked for similar
interactions with the GUI, and de-bugged. RH

runMC
-----
function (prefix, nsims = 2000, nthin = 20, outsuff = ".mc.dat", 
    logfile = FALSE, add = TRUE, verbose = TRUE) 
{
    outf <- paste(prefix, outsuff, sep = "")
    arg1 <- paste("-mcmc", .asIs(nsims), "-mcsave", .asIs(nthin), 
        sep = " ")
    setWinVal(list(argvec = arg1))
    arg2 <- "-mceval"
    runAD(prefix, arg1, logfile = logfile, add = add, verbose = verbose)
    p.out <- runAD(prefix, arg2, logfile = logfile, add = TRUE, 
        verbose = verbose)
    writeLines(p.out, outf)
    invisible(p.out)
}

Original issue reported on code.google.com by [email protected] on 6 Oct 2010 at 6:40

PBSadmb doesn't work in Linux

I tested PBSadmb today on my Ubuntu box. I first tried using the binary file 
admb-10.0-linux-gcc4.4.3-32bit.zip, but that didn't work because the file 
tpl2cpp wouldn't execute properly. Then I built my own version using configure 
and make. The name turned out to be admb-10.0-linux-gcc4.4.1-32bit.zip (just a 
.1 rather than a .3 in the version number), and this actually did work at the 
level of the OS (tpl2cpp, adcomp, adlink).

However, even with paths set correctly in PBSadmb, the R commands convAD, 
compAD, and linkAD do not work.

Original issue reported on code.google.com by [email protected] on 6 Mar 2011 at 6:30

.doClean() required but missing

In the admb() GUI, <Make> an example like "vonb". This generates various 
junk files. Now click <Clean> in the "Make" section of the GUI. This 
brings up the "Clean" GUI. Click <Clean> in that GUI.

With both Windows and Ubuntu, I get the message:

Error in do.call(command, list(), env = .PBSmod[[winName]]$env) : 
  could not find function ".doClean"

I'm using "PBS Modelling 2.23.126" and "PBS ADMB for Windows 0.50.20"


Original issue reported on code.google.com by [email protected] on 7 Sep 2009 at 6:04

Support installADMB from our own Google site

The functions installADMB probably no longer works because file names have 
changed on the ADMB web site. I think we should post a binary version of ADMB 
for each package we support on our own web site. This would give us much more 
control over the software actually used by PBSadmb. Also, we could verify 
directly what's going on if users encounter problems.

We're aiming to support Windows (32 and 64 bit), Linux (32 and 64 bit), and Mac 
OS X (always 64 bit?). Linux and Mac should have native C/C++ compilers 
(although maybe more than one version), but in Windows we need to support GCC 
(perhaps multiple versions) and probably the free version of MS visual C, which 
seems to be the only version with full 64 bit support.

As we work toward a new, more robust version of PBSadmb, we need to decide 
which operating systems and C compilers that we're prepared to support.

Original issue reported on code.google.com by [email protected] on 21 Sep 2010 at 9:46

Corrected the batch files to run the Windows version of ADMB

The batch files in inst\ADMtools didn't work properly because the native ADMB 
batch files require listing the options before the file prefix name. Also, one 
file had the name "vonb" hard wired.

I've fixed them and posted the corrected files in release 56.

Original issue reported on code.google.com by [email protected] on 3 Mar 2011 at 7:09

Function to loop through data files

Following a suggestion by Saang-Yoon Hyun, design an R function that will 
perform multiple runs of a single ADMB executable applied to all data 
files in the current working directory (cwd). Output should be a matrix 
with as many rows as data files. Each row should contain estimates and 
standard deviations of all model parameters.

I sent the attached file to Saang-Yoon. The line

fnames = shell("dir /b *.dat",intern=T)

would give a vector of all data file names in the cwd (for Windows).

Original issue reported on code.google.com by [email protected] on 12 Jul 2009 at 11:44

Attachments:

Fix the documentation for building ADMB

The file Building-ADMB.doc in the Authors directory of trunk needs to be 
updated to reflect the "configure" step in the official ADMB documentation for 
32 bit and 64 bit Windows. Alex, I know you've managed to get things working, 
and we may even have documentation about it somewhere not on this Google code 
site. (Email?)

Alex, could you please fix the file Building-ADMB.doc to start the Windows 
builds (32 and 64) with the configure step? Thanks.

Original issue reported on code.google.com by [email protected] on 29 Mar 2011 at 6:31

Set fails in the new GUI

The new GUI is great, but the "Set" button doesn't work to select the current 
working directory. I get the message:

Error in .changeWD() : could not find function "tclvalue"

Original issue reported on code.google.com by [email protected] on 30 Jan 2011 at 8:40

Suggestions for user guide

Suggestions for the PBSadmb user guide (mostly minor), which I printed on
17th Sept 2009:

page 5, Step 1, end of paragraph: maybe add " (your directory might be
C:\Program Files\R\Rx.xx or something similar). "    That seems to be the
default nowadays, which is what most people would use.

page 5, Step 3: ...download the file "Rtools28.exe"  - add "  (or the
latest version available)  ".  

page 5, step 6: I had to do  installADMB()  to get the ADMB code downloaded
from google codes. 

page 6 describes how to load in the .tpl etc. files for the examples. But
then for the examples it doesn't say which buttons to press (presumably
Make, Convert, Compile and Run, but I'm not sure if they're all needed). I
haven't looked through the appendix of function names yet, and I think
they'd explain everything there. But a bit of guidance for the first
example would be useful. 

page 6, just before the examples: it would be helpful to point out that the
plotting options (Pairs, Eggs, etc. ) in the Output area are only for MCMC
runs. The simple.tpl example works fine, but you don't get to see any plots
of the output. (Presumably because it would be hard to have some generic
buttons that compare model predictions to the data, in the sense that the
code would need to be different for different models - that might or might
not be worth mentioning). But then simplePBS.r usefully does have the R
code to explicitly plot the regression line and the data.

page 7. For the pheno example, need to mention that you have to select "Ran
Eff:" to yes to get it to work. 

I'd found some other problems, but they've already been fixed in the latest
version. Good job!

I'm using PBSadmb version 0.50.34 and PBSmodelling 2.23.142, both
downloaded on 6th Oct 2009, and Windows XP. 

Original issue reported on code.google.com by [email protected] on 6 Oct 2009 at 6:45

Random effects in Linux

A problem persists in Linux with compiling the "pheno" example, which 
involves random effects.

This issue probably has a really easy fix. The code tries to run the 
command "tpl2rem.exe", which works in Windows. However, this file doesn't 
exist in the Linux version, where the executable is called "tpl2rem".

Original issue reported on code.google.com by [email protected] on 23 Sep 2009 at 7:48

PBSadmbwin: Cleaning .r files

Require PBSadmbwin, run admb(), select the vonb example, make it, and run 
it. Now click the Clean button in the Make section of the GUI. Note a list 
of files associated with the prefix vonb, including Vonb.r. Click Clean in 
the Clean GUI.

Note that Vonb.r isn't in the Choice list. Say Yes to clean.

Now refresh the Clean GUI. Vonb.r is still in the list, but you can't 
delete it because it supposedly doesn't exist.

Finally, check the working directory. Indeed, vonb.r is located there.

What's wrong? Should we avoid .r files in the Clean function, anyway? How 
did vonb.r appear in the Clean GUI with upper case "V"?

(We'll have to be especially careful in Linux, where files are case 
sensitive.)

Original issue reported on code.google.com by [email protected] on 22 Jul 2009 at 2:07

More generic version of PBSadmb

As discussed in issue 1, PBSadmb needs to be extended to other operating 
systems. As a start, it would help to have a database of commands required 
to convert (from tpl to c), compile, and link for a wide variety of 
operating systems and compilers. The commands convAD, linkAD, compAD, and 
makeAD could then implement strings from the database. We should use 
the "system" (rather than "shell") command for generality across operating 
systems.

The intial version of PBSadmb embedded the required ADMB libraries (for 
Windows) in the package. That's probably not a good idea in the long run. 
Instead, a user would first have to install ADMB for the operating system. 
That philosophy is used by other R packages, such as rggobi (which won't 
work unless ggobi is installed).

If we followed that philosophy, we could post PBSadmb on CRAN, because it 
would contain no binary code.

Original issue reported on code.google.com by [email protected] on 10 Jul 2009 at 3:26

GUI bug: "Var" button in the "Output" tab fails

The "Var" button is supposed to give a user a list of possible variables to 
choose in a pairs plot. Currently, when I click on "Var", the R console 
displays the message:

Warning: cannot find function '.chooseCols'.

Conjectures: Either the function .chooseCols has been dropped somehow or it 
isn't properly addressed by the GUI in the PBSadmb namespace.

Note that the possible choices should come from the variable "mcnames" in the 
*.rep file. For example, vonb.rep has the lines:

$mcnames
Linf K t0 sigma LK fval

Original issue reported on code.google.com by [email protected] on 23 Mar 2013 at 2:26

Active use of the compiler choice ADMBcmd$Comp

Currently, PBSadmbwin never actually checks the compiler choice required 
to select scripts from ADMBcmd$Comp. At present only the option "GCC" is 
available. Somehow, we need to incorporate this choice into our package. 
The current definition of "parseCmd" (line 795 of "PBSadmb.r" in revision 
18) has a default argument comp="GCC" that never gets altered.

I think the GUI should have a droplist of values currently supported in 
ADMBcmd. The choice needs to be preserved and used in the file ADopts.txt.

We should try to add another compiler to our package. I suggest adding the 
free Borland compiler (http://www.codegear.com/downloads/free/cppbuilder) 
in Windows to our list. I've been told that the compile/link steps happen 
more quickly with this compiler (good for debugging), but the executable 
runs more slowly. So a user might want to switch compilers between the 
development and production phases.

Original issue reported on code.google.com by [email protected] on 27 Aug 2009 at 7:48

simplePBS.r example not consistent

The user guide (bottom page 6) says to use the file simplePBS.r, which
makes simplePBS.exe from simpletPBS.tpl, etc. But when you load the example
using the GUI, the file is actually called simple_pbs.r, and the others are
simple_pbs.tpl ...dat ...pin  

But, simple_pbs.r tries to use simplePBS.*   . It says  
makeAD("simplePBS") etc. Easiest solution is to rename the four simple_pbs
files as simplePBS, which will be consistent with the manual and then
simplePBS.r runs as is. 

(The more complicated option is to change simplePBS -> simple_pbs all four
times in the file simple_pbs.r, and change the manual).

I'm using PBSadmb version 0.50.34 and PBSmodelling 2.23.142, both
downloaded on 6th Oct 2009, and Windows XP. 

Original issue reported on code.google.com by [email protected] on 6 Oct 2009 at 6:42

example files must be lower case

admb seems to convert project names to lowercase before looking for the
corresponding .dat or .pin files. Therefore examples must be entirely
lowercase in order to work under linux.

Original issue reported on code.google.com by [email protected] on 26 Aug 2009 at 7:48

Failure to pass a CRAN check

***** Message from Kurt Hornik

We recently found a bug that has caused undocumented data sets to go unnoticed 
for some time: the bug was fixed in both r-devel and r-patched, resulting in 
the warnings for your packages given below.

Note that if PATH is the path to your package data subdirectory, you can 
conveniently obtain a listing for the data sets provided by each data file via

  tools:::list_data_in_pkg(dataDir = PATH)

Package: PBSadmb Version: 0.61.44 Flavor: r-devel-linux-x86_64-gcc-fedora
Check: for missing documentation entries ... WARNING
which: no tpl2rem in 
(.:/data/gannet/ripley/bin:/usr/local/bin:/usr/local/texlive/2010/bin/x86_64-lin
ux:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/loc
al/bin:/bin:/usr/bin)
All user-level objects in a package should have documentation entries.
See the chapter 'Writing R documentation files' in manual 'Writing R 
Extensions'.

***** Reply by Jon Schnute

Dear Kurt - In regard to the package PBSadmb, it appears to me that the new fix 
to 'R CMD check' "for missing documentation entries" can sometimes give 
misleading warnings.

The message from our package (repeated below this note) suggests that "tpl2rem" 
is a user-level object that requires documentation. In fact, this value is only 
part of string hidden from a user inside the function "convAD".

I won't bother you with the reasons for doing this in PBSadmb, but I think the 
CRAN developers should know that the assumptions they're making in the current 
'R CMD check' might sometimes wrongly identify things that appear to be 
user-level objects.

I know you're very busy, and I really hate to trouble you with issues like 
this. But I can't fix something that genuinely is OK. Also, given the 
circumstances, I don't know how to trick 'R CMD check' into believing that the 
code is valid.

Best wishes!
Jon

PS - Perhaps the best philosophy is to ignore warnings that aren't legitimate. 
We have done this in the past with all of our "PBS" packages.

***** Reply by Brian Ripley

The underlying problem is that PBSmodelling::findProgram rolls its own rather 
than using Sys.which. Please do make use of the latter: there are a couple of 
subtleties you have missed.

>> PS - Perhaps the best philosophy is to ignore warnings that aren't 
>> legitimate. We have done this in the past with all of our "PBS"
>> packages.

But not in the present!




Original issue reported on code.google.com by [email protected] on 21 Sep 2010 at 9:00

Bash scipts for Linux analogous to the batch scripts for Windows in ADMtools

I recently discovered that Ubuntu is configured to include $Home/bin on the 
path if such a directory exists. This appears to be the Linux standard for 
enabling a user to supply customised scripte and executable files.

I found it very awkward today getting ADMB working from my own build, which I 
finally added as a subdirectory of $Home. If I had bash files, comparable to 
the DOS batch files, I would have put them in $Home/bin and had everything 
working at the OS level quickly.

I wasted a lot of time on the relatively simple task of converting the current 
DOS scripts to bash scripts. The problem is that I'm still a complete novice 
with bash.

Alex, could you please write these conversions, and add them to inst/ADMtools? 
I think this is an important tool for testing ADMB independently from PBSadmb.

Original issue reported on code.google.com by [email protected] on 6 Mar 2011 at 6:47

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.