[R] simple problem

Liaw, Andy andy_liaw at merck.com
Mon Jan 23 21:15:46 CET 2006


From: Ronaldo Reis-Jr.
> 
> Hi,
> 
> look this:
> 
> > summary(família)
>    Anacardiaceae       Annonaceae      Bombacaceae     Cecropiaceae 
>                2                4                1                3 
> Chrysobalanaceae       Clusiaceae    Euphorbiacaea          Fabacea 
>                1                1                4                3 
>         Fabaceae   Flacourtiaceae      Humiriaceae    indeterminada 
>               17                2                1                2 
>        Lauraceae    Malpighiaceae        Meliaceae       Mimosaceae 
>                4                4                6                1 
>          Moracea         Moraceae        Myrtaceae    Nyctaginaceae 
>                1                1                2                1 
>        Olacaceae        Rubiaceae       Sapotaceae        Violaceae 
>                2                1                3                1 
> 
> > summary(família)==17
>    Anacardiaceae       Annonaceae      Bombacaceae     Cecropiaceae 
>            FALSE            FALSE            FALSE            FALSE 
> Chrysobalanaceae       Clusiaceae    Euphorbiacaea          Fabacea 
>            FALSE            FALSE            FALSE            FALSE 
>         Fabaceae   Flacourtiaceae      Humiriaceae    indeterminada 
>             TRUE            FALSE            FALSE            FALSE 
>        Lauraceae    Malpighiaceae        Meliaceae       Mimosaceae 
>            FALSE            FALSE            FALSE            FALSE 
>          Moracea         Moraceae        Myrtaceae    Nyctaginaceae 
>            FALSE            FALSE            FALSE            FALSE 
>        Olacaceae        Rubiaceae       Sapotaceae        Violaceae 
>            FALSE            FALSE            FALSE            FALSE 
> 
> > família[summary(família)==17]
> [1] Fabaceae  Rubiaceae Meliaceae
> 24 Levels: Anacardiaceae Annonaceae Bombacaceae ... Violaceae
> 
> Why it dont work? Only Fabaceae == 17.

If you look at length(familia) and length(summary(familia) == 17) perhaps
you'll see the light...

Andy

 
> Thanks
> Ronaldo
> 
> --
> |>   // | \\   [***********************************]
> |   ( õ   õ )  [Ronaldo Reis Júnior                ]
> |>      V      [UFV/DBA-Entomologia                ]
> |    /     \   [36570-000 Viçosa - MG              ]
> |>  /(.''`.)\  [Fone: 31-3899-4007                 ]
> |  /(: :'  :)\ [chrysopa at insecta.ufv.br            ]
> |>/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ]
> |    ( `-  )   [***********************************]
> |>>  _/   \_Powered by GNU/Debian Woody/Sarge
> 
> ______________________________________________
> R-help at 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
> 
>




More information about the R-help mailing list