Re: [Rd] Help with lang4

2009-10-29 Thread Simon Urbanek
On Oct 29, 2009, at 13:56 , Seth Falcon wrote: On 10/29/09 7:38 AM, Abhijit Bera wrote: Can't find the source to Rf_lang* series of functions. :| But I'm thinking it should be like this correct me if I'm wrong: PROTECT(e=lang4(install("myfunction"),arg1,arg2,arg3); PROTECT(SETCAR(CDR(e),port

Re: [Rd] Help with lang4

2009-10-29 Thread Seth Falcon
On 10/29/09 7:38 AM, Abhijit Bera wrote: Can't find the source to Rf_lang* series of functions. :| But I'm thinking it should be like this correct me if I'm wrong: PROTECT(e=lang4(install("myfunction"),arg1,arg2,arg3); PROTECT(SETCAR(CDR(e),portConstraints)); PROTECT(portVal=R_tryEval(e,R_Globa

Re: [Rd] Help with lang4

2009-10-29 Thread Duncan Murdoch
On 29/10/2009 10:38 AM, Abhijit Bera wrote: Can't find the source to Rf_lang* series of functions. :| They're in src/include/Rinlinedfuns.h. Duncan Murdoch But I'm thinking it should be like this correct me if I'm wrong: PROTECT(e=lang4(install("myfunction"),arg1,arg2,arg3); PROTECT(SETCAR

Re: [Rd] Help with lang4

2009-10-29 Thread Seth Falcon
On 10/29/09 7:00 AM, Abhijit Bera wrote: Hi I seem to have run into a situation where I have more than 3 arguments to pass to a function from C. the following functions help me build an expression for evaluation: lang lang2 lang3 lang4 What should one do if there are more arguments than lang4

Re: [Rd] Help with lang4

2009-10-29 Thread Abhijit Bera
Can't find the source to Rf_lang* series of functions. :| But I'm thinking it should be like this correct me if I'm wrong: PROTECT(e=lang4(install("myfunction"),arg1,arg2,arg3); PROTECT(SETCAR(CDR(e),portConstraints)); PROTECT(portVal=R_tryEval(e,R_GlobalEnv, NULL)); Regards Abhijit Bera On Th

[Rd] Help with lang4

2009-10-29 Thread Abhijit Bera
Hi I seem to have run into a situation where I have more than 3 arguments to pass to a function from C. the following functions help me build an expression for evaluation: lang lang2 lang3 lang4 What should one do if there are more arguments than lang4 can handle? Regards Abhijit Bera