Re: [R] Function doesn't work inside loop but works outside

2019-03-05 Thread Ek Esawi
Thank you Peter. That's a dumb question on my part! At least i should have known that i need an assignment statement. Thanks again--EK On Tue, Mar 5, 2019 at 11:36 AM peter dalgaard wrote: > > You need a print() around the gsub(...) when inside a loop. > > -pd > > > On 5 Mar 2019, at 17:18 , Ek

Re: [R] Function doesn't work inside loop but works outside

2019-03-05 Thread peter dalgaard
You need a print() around the gsub(...) when inside a loop. -pd > On 5 Mar 2019, at 17:18 , Ek Esawi wrote: > > Hi All, > > I am using xlsx package to extract and clean data from an Excel > Workbook. I ran into a strange behavior that I don’t understand. The > gsub doesn’t work inside the loop

[R] Function doesn't work inside loop but works outside

2019-03-05 Thread Ek Esawi
Hi All, I am using xlsx package to extract and clean data from an Excel Workbook. I ran into a strange behavior that I don’t understand. The gsub doesn’t work inside the loop but does outside the loop as shown on my code.. Tried to Google for help but nothing came up. My code loads and reads data