[R] Help with sub functions

2009-09-29 Thread edchen51
I have chances to work with both linux based and win based R codes. And as you all know in linux, the file directories use "/" and win uses "\\". Is there a function like sub or gsub that could substitute those slashes automatically? Thanks! Edward Chen Email: tke...@msn.com Cell Phone: 510-37

Re: [R] Help with for loop

2009-09-14 Thread edchen51
thank you all for your help. I do know how to use which() but my problem is that I am writing a function in which this is just part of it. After seeing the (a-b)[b wrote: On Sep 14, 2009, at 3:02 PM, Jorge Ivan Velez wrote: Hi Edward, Here is a suggestion: a = c(4,5,1,7,8,12,39) b =