Hello, I have another (possibly easy) question: How to specify the size of a plot? When I draw a plot, I can freely change the size of the window, which is nice for single plots to find the best height/width ratio, but as I need a lot of plots in my work, I want to look them all the same, so I need to specify the size in advance. Thanks for help, Christoph
Have you tried using pdf(), postscript(), or jpeg()? All of these have arguments to specify the height and width of the device. On 10/8/07, Christoph Krammer <ck at altaica.de> wrote:> Hello, > > I have another (possibly easy) question: > > How to specify the size of a plot? When I draw a plot, I can freely change > the size of the window, which is nice for single plots to find the best > height/width ratio, but as I need a lot of plots in my work, I want to look > them all the same, so I need to specify the size in advance. > > Thanks for help, > Christoph > > ______________________________________________ > 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. >
Hi r-help-bounces at r-project.org napsal dne 08.10.2007 15:15:58:> Hello, > > I have another (possibly easy) question: > > How to specify the size of a plot? When I draw a plot, I can freelychange> the size of the window, which is nice for single plots to find the best > height/width ratio, but as I need a lot of plots in my work, I want tolook see ?device for different devices and their sizes. Regards Petr> them all the same, so I need to specify the size in advance. > > Thanks for help, > Christoph > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
Hello I need to print table width "colum sum" like X V1 V2 TOT A 2 3 5 B 1 6 7 C 4 6 10 how i can do it by table function? Thanks Alessandra
On Mon, 2007-10-08 at 16:18 +0200, Alessandra Marmo wrote:> Hello > I need to print table width "colum sum" like > X V1 V2 TOT > A 2 3 5 > B 1 6 7 > C 4 6 10 > > how i can do it by table function? > > Thanks > > AlessandraPresuming that your object above is a data frame, you can add a new column using cbind():> tabX V1 V2 1 A 2 3 2 B 1 6 3 C 4 6> cbind(tab, TOT = tab$V1 + tab$V2)X V1 V2 TOT 1 A 2 3 5 2 B 1 6 7 3 C 4 6 10 See ?cbind. For actual R tables, you can use ?addmargins HTH, Marc Schwartz
If it really is of class "table" (or is an array) or you convert it to such you can use addmargins. You may need to read ?addmargins carefully. On 10/8/07, Alessandra Marmo <alessandra.marmo at unicam.it> wrote:> Hello > I need to print table width "colum sum" like > X V1 V2 TOT > A 2 3 5 > B 1 6 7 > C 4 6 10 > > how i can do it by table function? > > Thanks > > Alessandra > > ______________________________________________ > 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. >