[R] Apply() on columns

Petr PIKAL petr.pikal at precheza.cz
Wed Jun 20 18:01:06 CEST 2012


Hi
 
> Hi,
> 
> Yes, the columns are related: V1 is related to V6, V2 is related to V7 
and
> so on. The columns V1,V2,V3,V4,V5 contains the number of employees (in a
> filling team). The columns V6,V7,V8,V9,V10 contains the number of worked
> hours of the filling team. 

You shall rather include your data.frame to email by dput instead of just 
vaguely describing it. If it is too big use only part of it.


> What I am interested in is the average working hours per employee. 
Therefore
> I have go give some graphical and numerical summaries to present the 
average
> working hours per employee.  The function that I must use is apply().

Why do you need to use apply? Is it a homework? There is no homework 
policy on this list.

I would use some kind of ?aggregate construction.

Regards
Petr

> 
> How can I present with that function a graphical and numerical summarie 
of
> the average working hours per employee? [some example and explanation 
would
> be respected]
> 
> Yours,
> 
> FA Elsendoorn
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Apply-on-
> columns-tp4633468p4633917.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list