dear allI 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 MSNepal _________________________________________________________________ Hotmail: Trusted email with Microsoft?s powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141664/direct/01/ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: correlation.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091015/f43ac4f8/attachment-0002.txt>
> dear allI 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 MS Nepal _________________________________________________________________ Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. http://clk.atdmt.com/GBL/go/171222985/direct/01/ -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: correlation.txt URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20091016/6fd6a211/attachment-0002.txt>
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