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

stefano iacus stefano.iacus at unimi.it
Thu Jan 26 08:36:49 CET 2006


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 at ucl.ac.uk / sylvaincharlat at 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 at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac




More information about the R-help mailing list