[R] Apply() on columns

Peter Ehlers ehlers at ucalgary.ca
Fri Jun 15 18:57:18 CEST 2012


On 2012-06-15 01:09, faelsendoorn wrote:
> Hi,
>
> I have some trouble with the following: I have a table of 7 rows and
> 6columns. The columns 1,2,3 have information about the number of employees.
> The columns 4,5,6 have information about the number of working hours. Each
> row, is corresponding with a week.
> My goal is to make a boxplot, histogram etc. of the columns 4, 5 and 6

I don't know what the "etc" is, but I strongly suggest that you NOT
make boxplots or histograms for data consisting of 7 values.
Consider stripchart().

Peter Ehlers

> (thus, the data of the number of working hours). How can I select by using
> the function Apply the weeks i needed for fullfulling my goal?
>
> I already tried something with environment variables but that is a hard
> stop.  I think, when I can select the columns I wanted with the
> corresponding rows, that it would not be a problem making a histogram etc.
>
> Yours,
>
> Frans Elsendoorn
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Apply-on-columns-tp4633468.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