Re: [R] APPLY as alternate to FOR loop?

2008-04-02 Thread Johannes Hüsing
[EMAIL PROTECTED] [EMAIL PROTECTED] [Mon, Mar 31, 2008 at 07:02:25AM CEST]: As far as I know there is no function called 'APPLY' There is one called 'apply', but why are you determined to use it here? It is essentially concealed looping. I always use apply instead of for when the steps can

[R] APPLY as alternate to FOR loop?

2008-03-30 Thread zack holden
Dear list, Below I've written a clunky for loop that counts NA's in a row, replacing all with NA if there are more than 3 missing values, or keeping the values if 4 or more are present. This is sample code from a very large dataframe I'm trying to clean up. I know there are many simpler

Re: [R] APPLY as alternate to FOR loop?

2008-03-30 Thread Bill.Venables
-project.org Subject: [R] APPLY as alternate to FOR loop? Dear list, Below I've written a clunky for loop that counts NA's in a row, replacing all with NA if there are more than 3 missing values, or keeping the values if 4 or more are present. This is sample code from a very large dataframe I'm trying