[R] Average value in a particular range of a matrix

John Kane jrkrideau at inbox.com
Thu Jun 12 16:00:52 CEST 2014


?mean

You need to read tutorial or two, particularly with reference to indexing.

The CRAN site has any number of useful papers and books that you can download.

John Kane
Kingston ON Canada


> -----Original Message-----
> From: leonardsquall15 at hotmail.com
> Sent: Wed, 11 Jun 2014 12:17:02 +0000
> To: r-help at r-project.org
> Subject: [R] Average value in a particular range of a matrix
> 
> Hi
> 
> I have a matrix with values of size 1*500  i have to find the avg
> value of first 1 to 100 ,avg value of 100 - 200 and so on up to 400-500.
>  is there any function to find the average of 1 -100 and 100 - 200, 200 -
>  300,300 - 400,400 - 500 ??
> 
> Thanks
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!



More information about the R-help mailing list