[R] print matrix content on plot
Greg Snow
Greg.Snow at intermountainmail.org
Mon Nov 19 21:03:33 CET 2007
The textplot function in the gplots package may be of help.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at intermountainmail.org
(801) 408-8111
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of Monica Pisica
> Sent: Monday, November 19, 2007 8:17 AM
> To: r-help at r-project.org
> Subject: [R] print matrix content on plot
>
>
> Hi,
>
> I saved as a matrix a summary of a PCA analysis and I've used
> barplot to plot the PCA variances. I would like to print on
> the same graphic the values of my matrix m1 - in other words
> the summary of my PCA analysis. I can do it very painstaking
> with text for each row and make sure that everything aligns
> and so on but i wonder if there is a better method than that.
>
> My summary follows:
>
> m1
>
> PC1 PC2 PC3
> PC4 PC5 PC6 PC7 PC8
> PC9Standard deviation 12.67140 8.252798 7.407514 3.71649
> 3.338228 1.974144 1.813919 1.416385 0.9981993Proportion of
> Variance 0.50054 0.212320 0.171060 0.04306 0.034740 0.012150
> 0.010260 0.006250 0.0031100Cumulative Proportion 0.50054
> 0.712870 0.883920 0.92698 0.961720 0.973870 0.984130 0.990380
> 0.9934900
> PC10 PC11
> PC12 PC13 PC14 PC15 PC16
> PC17Standard deviation 0.9269088 0.8002766 0.4510176
> 0.3911732 0.3414279 0.2566597 0.2248179
> 6.359533e-16Proportion of Variance 0.0026800 0.0020000
> 0.0006300 0.0004800 0.0003600 0.0002100 0.0001600
> 0.000000e+00Cumulative Proportion 0.9961700 0.9981600
> 0.9988000 0.9992700 0.9996400 0.9998400 1.0000000 1.000000e+00
>
> Thanks,
>
> Monica
> _________________________________________________________________
>
>
> PC_MediaCtr_bigscreen_102007
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list