Re: [R] Problem in compiling a function

2014-07-03 Thread Abhinaba Roy
Got it..Thanks :) On Thu, Jul 3, 2014 at 12:44 PM, Pascal Oettli wrote: > 3rd line: > > if(!is.na(CA_AMT_PAYBACK ){ > ^^ ^ > > Two brackets opened, only one closed. You must close the second one. > > HTH > Pascal > > > On Thu, Jul 3, 2014 at 4:03 PM, Abhina

Re: [R] Problem in compiling a function

2014-07-03 Thread Pascal Oettli
3rd line: if(!is.na(CA_AMT_PAYBACK ){ ^^ ^ Two brackets opened, only one closed. You must close the second one. HTH Pascal On Thu, Jul 3, 2014 at 4:03 PM, Abhinaba Roy wrote: > Hi, > > The 'if' statement closes > CA$IND_COLLECTION[CA$TOT_PAID= > =0] <- 5L

Re: [R] Problem in compiling a function

2014-07-03 Thread Abhinaba Roy
Hi, The 'if' statement closes CA$IND_COLLECTION[CA$TOT_PAID= =0] <- 5L} On Thu, Jul 3, 2014 at 12:12 PM, Pascal Oettli wrote: > Hi, > > At the 3rd line, a bracket is missing, to close the "if" statement. > > HTH > Pascal > > On Thu, Jul 3, 2014 at 3:29 PM, Abhinaba Roy > wrote: > > Hi R-help

Re: [R] Problem in compiling a function

2014-07-02 Thread Pascal Oettli
Hi, At the 3rd line, a bracket is missing, to close the "if" statement. HTH Pascal On Thu, Jul 3, 2014 at 3:29 PM, Abhinaba Roy wrote: > Hi R-helpers, > > Can someone help me with this function > > prepArr <- function(CA) { > if(CA$CD_ACCRUAL_FLAG == 'AY' ){ > if(!is.na(CA_AMT_PAYBACK ){

[R] Problem in compiling a function

2014-07-02 Thread Abhinaba Roy
Hi R-helpers, Can someone help me with this function prepArr <- function(CA) { if(CA$CD_ACCRUAL_FLAG == 'AY' ){ if(!is.na(CA_AMT_PAYBACK ){ CA$IND_COLLECTION[(CA$TOT_PAID>=CA$TOT_ARREAR_BEG| CA$TOT_PAID>=CA_AMT_PAYBACK)] <- 1L CA$I