Re: [R] [R-SIG-Mac] Hist for different levels of a factor

From: stefano iacus <stefano.iacus_at_unimi.it>
Date: Thu 26 Jan 2006 - 18:36:49 EST

The list of your interest is R-help not R-sig-mac stefano

Il giorno 26/gen/06, alle ore 01:20, Sylvain Charlat ha scritto:

> Hi,
>
> Is there any simple way to get histogram for different levels of
> factor?
>
> Say you have the following data set:
>
> Island Sp.diam
> Moorea 1.21
> Moorea 1.27
> Moorea 1.28
> Moorea 1.22
> Moorea 1.28
> Rurutu 1.5
> Rurutu 1.67
> Rurutu 1.75
> Rurutu 1.55
> Rurutu 1.7
> Rurutu 1.55
> Rurutu 1.59
> Rurutu 1.66
> Rurutu 1.7
>
> Is there anything better than:
>
>> hist(Sp.diam[factor(Island)=="Moorea"],main="Island=Moorea")
>
> followed by
>
>> hist(Sp.diam[factor(Island)=="Rurutu"],main="Island=Rurutu")
>
> Sorry for this very stupid and basic question...
>
> Thanks for any help,
>
> Sylvain.
>
> ---------------------------------------------------------------
> Sylvain Charlat
> s.charlat@ucl.ac.uk / sylvaincharlat@yahoo.fr
> http://www.ucl.ac.uk/~ucbtghu/Sylvain.htm
> - Department of Biology, University College London
> 4 Stephenson Way, London, NW1 2HE, UK
> - Fieldwork address:
> Gump Station, University of California Berkeley
> BP 244 Maharepa, 98728 Moorea, French Polynesia
> - Phone (Moorea): (+689) 56 43 97 or 26 90 18 or 56 52 87
> - Fax (Moorea): (+689) 56 32 72
> - Phone / Fax (London): (+44)20 76795072 / +(44) 20 76795052
> ---------------------------------------------------------------
>
>
>
>
>
>
>
>
> ______________________________________________________________________
> _____
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez
> les tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez sur http://fr.messenger.yahoo.com
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



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 Received on Thu Jan 26 18:46:17 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:12 EST