[R] converting to data.frame
    David Winsemius 
    dwinsemius at comcast.net
       
    Fri Oct 16 04:48:37 CEST 2009
    
    
  
You probably could have saved some time by installing Hmisc and using  
rcorr:
---something like:
require(Hmisc)
typecors <- tapply(c.df[ , c("age_obs", "Ht_cm", "BD_mm", "CDA_cm",  
"CDB_cm") ], c.df$type, rcorr )
The upper or lower triangle of those results could have populated most  
of your table and you could cbind the combined result of:
combcors <- rcorr(c.df[ , c("age_obs", "Ht_cm",   "BD_mm",    
"CDA_cm",  "CDB_cm") ])
... and add the age_obs Vs est_age row. Tables are actually matrices  
and use the same sort of indexing. Cbind and rbind augment columnwise  
and rowwise.
-- 
David
On Oct 15, 2009, at 10:07 PM, ms.com wrote:
>
>
>> dear all
>
> I have a data set with three types (Tree, Sapling, Seedling). I have  
> estimated the correlation values. now i need to bring all the  
> correlation values in a table like the one i have shown in attached  
> file with R codes.could you please give me idea on this problem
>>
> thanking you
>
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
    
    
More information about the R-help
mailing list