[R] Apply a function for each Row

2005-09-14 Thread Marc Bernard
Dear All,
 
I wonder how to apply a given function to  each row of a data frame. I've seen 
this function before  but don't remember its name
 
Thank you,
 
Bernard 


-


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Apply a function for each Row

2005-09-14 Thread Barry Rowlingson
Marc Bernard wrote:
 Dear All,
  
 I wonder how to apply a given function to  each row of a data frame. I've 
 seen this function before  but don't remember its name

  You've just said it twice!

'apply'!

Baz

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Apply a function for each Row

2005-09-14 Thread Liaw, Andy
 From: Barry Rowlingson
 
 Marc Bernard wrote:
  Dear All,
   
  I wonder how to apply a given function to  each row of a 
 data frame. I've seen this function before  but don't 
 remember its name
 
   You've just said it twice!
 
 'apply'!

A small catch:  Marc wants to apply the function to rows of a data frame,
but apply() expects a matrix or array, and will coerce to such if given a
data frame, which may (or may not) be problematic...

Andy

 Baz
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html
 
 


__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html