Re: [R] [ADMB Users] R2admb compile problem

2013-10-22 Thread Allan Clark
Hello guys Arni, you were correct. The R search path contained 'C:/MinGW/bin;' which contains a g++ compiler. I removed it and now it works fine! Thank you for the help. Just for completeness sake: (the R code and output is included below) #==

[R] R2admb compile problem

2013-10-20 Thread Allan Clark
Good morning all I am trying to use R2admb and have the following very simple example. The *.tpl is included below. I am a Windows 7 user, using R3.01. //Function1.tpl //* PARAMETER_SECTION init_number x; objective_function_value C; PROCEDURE_SECTION C= pow(x

[R] mpirun .C and R

2011-02-03 Thread Allan Clark
hello all For those interested! i figured out the problem! I needed to put the dyn.load and dyn.unload lines inside the loop! library(doMPI) cl <- startMPIcluster(count=2)#this will b

[R] R: mpirun .C and R

2011-02-03 Thread Allan Clark
hello all i am busy testing some code that will be used for parallel computations on a Moab cluster. I have written a C++ program and am linking it with R using the .C command - this works correctly. Extracts of the r code (as well as the *.sh file) is included below. I am able to run the co

[R] Recall function: "evaluation nested too deeply: infinite recursion / options(expressions=)?"

2010-02-11 Thread Allan Clark
correct! ie -.5, .5, 3/2, 5/2, . if (v==-0.5) { return(1) }else { ntimes = v+1.5 R=array(0,dim=ntimes) R[1]=1 for (i in 2:ntimes) { R[i]= 2*v/z + 1/R[i-1] } return(R[ntimes]) } } Allan Clark Lecturer in Statistical Scie

[R] Fwd: Recall function: "evaluation nested too deeply: infinite recursion / options(expressions=)?"

2010-02-11 Thread Allan Clark
correct! ie -.5, .5, 3/2, 5/2, . if (v==-0.5) { return(1) }else { ntimes = v+1.5 R=array(0,dim=ntimes) R[1]=1 for (i in 2:ntimes) { R[i]= 2*v/z + 1/R[i-1] } return(R[ntimes]) } } Allan Clark Lecturer in Statistical Scie

[R] linking r and C

2010-01-18 Thread Allan Clark
some kind of metropolis hastings step} some other stuf assuming that one is unable to vectorise the R code, does it make sense to write C code to do all of the above steps? how dramatic will the time saved be? (any ideas) regards Allan Clark Lecturer in Statistical Sciences

[R] r: intergrate behaviour

2009-02-23 Thread Allan Clark
he same behaviour for J.K. Lindsey's int function. Allan Clark Lecturer in Statistical Sciences Department University of Cape Town 7701 Rondebosch South Africa TEL (Office): +27-21-650-3228 FAX: +27-21-650-4773 http://web.uct.ac.za/depts/stats/aclark.htm

[R] R: numerical integration problems

2009-01-02 Thread Allan Clark
list(correct=correct,App.2=App.2,App.trans=App.trans, App.gq=App.gq) } Allan Clark Lecturer in Statistical Sciences Department University of Cape Town 7701 Rondebosch South Africa TEL (Office): +27-21-650-3228 FAX: +27-21-650-4773 http://web.uct.ac.za/depts/stats/aclark.htm

[R] nls and "plinear" algorithm

2008-07-08 Thread Allan Clark
hello all i havnt had a chance to read through the references provided for the "nls" function (since the libraries are closed now). can anyone shed some light on how the "plinear" algorithm works? also, how are the fitted values obtained? also, WHAT DOES THE ".lin" below REPRESENT? thanking you

Re: [R] R: determinants and inverses

2008-01-22 Thread Allan Clark
(for those interested) |A+BC|=|A||I(p)+inv(A)BC|=|A||I(n)+Cinv(A)B| for B (p by n) , C (n by p), A (p by p) and non singular. regards Allan Clark Lecturer in Statistical Sciences Department University of Cape Town 7701 Rondebosch South Africa TEL (Office): +27-21-650-3228 FAX: +27-2

[R] R: determinants and inverses

2008-01-22 Thread Allan Clark
rson; S. R. Searle SIAM Review, Vol. 23, No. 1. (Jan., 1981), pp. 53-60. provides a result to calculate the inverse of I + ABC. (for those interested!!!) thanking you in advance Allan Clark Lecturer in Statistical Sciences Department University of Cape Town 7701 Rondebosch South