Re: [R] How to open more windows to make more graphs at once!
Hello, See ?Devices ?dev.print e.g. X11() # opens a new screen device plot(1:10) # plots points on the device dev.print(jpeg, [args]) # prints from the X11 device to a jpeg file dev.off() # close X11 device or jpeg([args]) # opens a jpeg device (file) for plotting plot(1:10) # plots points on the device dev.off() # closes connection to the jpeg device Hope this helps. Regards, -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] Quick question on Cochran-Mantel-Haenszel test
Hello, The R function mantelhaen.test implements the generalized method for IxJxK tables (not only 2x2xK). If I remember well, Mantel-Haenszel test is more accurate than the Cochran approximation. Regards, Le mardi 06 mars 2007 10:28, Serguei Kaniovski a écrit : Dear List, I am looking for what B.S.Everitt refers to as Cochrane Method for testing independence in combined 2x2 contingency tables. Is it the same method as the Cochran-Mantel-Haenszel Chi-Squared Test for Count Data in R? Thanks, Serguei [[alternative HTML version deleted]] __ R-help@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 and provide commented, minimal, self-contained, reproducible code. -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] background color behind symbols in legend()
Hello, I try to display coloured rectangles behind symbols in a legend (as a background): plot(10,10) legend(top, c(text,text2), pch=c(21,22), fill=c(red,green), pt.bg=black) On the resulting graph, the symbol is not centered upon the coloured rectangle. Is there a way to adjust their relative position, so that they are centered? Looking through ?legend has not helped me (but I might have missed the line where it is explained)... [R version 2.4.0 (2006-10-03) on linux] Thanks for any help. Best regards, -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] mixing symbols and rectangles in legend()
Hello, I try to mix symbols and coloured rectangles in a legend: plot(10,10) legend(top, c(text,text2), pch=c(21,22), fill=c(red,green), + pt.bg=black) On the resulting graph, the symbol is not centered upon the coloured rectangle. Is there a way to adjust their relative position, so that they are centered? Looking through ?legend has not helped me (but I might have missed the line where it is explained)... [R version 2.4.0 (2006-10-03) on linux] Thanks for any help. Best regards, -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] fitting all models in log-lm
Hello, I am trying to use R to carry out loglinear analysis. So far, starting from a previous post in this list (http://finzi.psych.upenn.edu/R/Rhelp02a/archive/33698.html), I have been able to use loglm() to generate likelihood ratio. I now try to find a function that generates all the models and another one to compare them. Thanks for any help. -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] multiline system call
Dear Sir, Le vendredi 22 décembre 2006 20:05, vous avez écrit : system(sh,intern=T,input=c(echo x,echo y)) Thanks for the advice, but I do not find doc about the input arg for the system function. Besides, $ system(sh,intern=T,input=c(echo x,echo y)) Erreur dans system(sh, intern = T, input = c(echo x, echo y)) : unused argument(s) (input = c(echo x, echo y)) Is R version 2.4.0 (2006-10-03) too old? Best regards, -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] multiline system call
Le vendredi 22 décembre 2006 23:31, Charles C. Berry a écrit : Perhaps a workaround is to pipe the input into sendmail (I recall sendmail accepts input from sdtin) from 'echo' This works fine this way. Thanks a lot. (but note that my 2.4.0 linux binary does not accept the input=xyz as an argument of the system() function.) -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] multiline system call
Hello, I am trying to call sendmail from within R via system(). As sendmail reads from STDIN, I need to pass a multiline input as an argument. E.g. (not working): system('sendmail -f [EMAIL PROTECTED] -t [EMAIL PROTECTED]') I tried a lot of ways to type the EOL characters, but cannot get them work the right way. This leads to several problems. For instance, R waits for me to enter control-D at the end of the sequence. Thanks for any help. -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are ...{{dropped}} __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] SOLVED kubuntu repository (was vcd package, assoc())
Thanks for your help. And sorry for not having noticed that kubuntu dapper packages were very outdated. This might help other kubuntu dapper users: - add this line to /etc/apt/sources.list deb http://cran.R-project.org/bin/linux/ubuntu dapper/ - uninstall all previously installed r packages added via apt (don't just update them); - update your installation by reinstalling the packages. vcd package now works. Le mercredi 06 décembre 2006 08:42, vous avez écrit : Nicolas Mazziotta wrote: R version is R 2.2.1 (kubuntu dapper package) So update your outdated version of R at first! At least to R-2.4.0, even better to R-2.4.0 patched which will soon become R-2.4.1. Anyway, David, the vcd maintainer, is certainly going to fix the DESCRIPTION's Depends entry. Best, Uwe Ligges Le mercredi 06 décembre 2006 08:26, Uwe Ligges a écrit : Error in unit.c(mar[4], unit(1, null), mar[2], legend_width) : It is invalid to combine unit objects with other types Works for me. Which version of R is this? R-2.4.0, R-patched or R-devel? -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are confidential and are intended for the sole use of the individual or entity to which it is addressed. Any distribution, copying or dissemination of this message is expected to conform to all legal stipulations governing the use of information. __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] vcd package, assoc()
Hello, I am trying to use the extended assocplot() function: assoc(), from vcd package. Trouble is that it cannot even run its own examples on my installation. I get this output: $ example(assoc) assoc data(HairEyeColor) assoc (x - margin.table(HairEyeColor, c(1, 2))) Eye HairBrown Blue Hazel Green Black68 2015 5 Brown 119 845429 Red 26 171414 Blond 7 941016 assoc assoc(x) Error in unit.c(mar[4], unit(1, null), mar[2], legend_width) : It is invalid to combine unit objects with other types Version info output by citation(vcd) is 1.0-1. Any idea about what's going wrong? Thanks for any help. -- Nicolas Mazziotta The contents of this e-mail, including any attachments, are confidential and are intended for the sole use of the individual or entity to which it is addressed. Any distribution, copying or dissemination of this message is expected to conform to all legal stipulations governing the use of information. __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] R Help
Not sure of what you ask... Does it help? $ read.table(Desktop/lahore.txt, header=T) Years lrmax n1 n2 n3 n4 arranged 1 1980 207.6 25 24 23 22 29.4 2 1981 92.7 24 23 22 21 49.4 3 1982 67.5 23 22 21 20 55.1 4 1983 93.8 22 21 20 19 58.0 5 1984 60.6 21 20 19 18 59.0 6 1985 117.4 20 19 18 17 59.1 7 1986 65.3 19 18 17 16 60.6 8 1987 59.1 18 17 16 15 65.3 9 1988 76.9 17 16 15 14 67.5 10 1989 123.1 16 15 14 13 69.6 11 1990 83.1 15 14 13 12 75.7 12 1991 75.7 14 13 12 11 76.8 13 1992 69.6 13 12 11 10 76.9 14 1993 55.1 12 11 10 9 83.1 15 1994 49.4 11 10 9 8 84.2 16 1995 76.8 10 9 8 7 87.0 17 1996 189.7 9 8 7 6 88.2 18 1997 151.1 8 7 6 5 92.7 19 1998 59.0 7 6 5 4 93.8 20 1999 88.2 6 5 4 3110.0 21 2000 110.0 5 4 3 2117.4 22 2001 87.0 4 3 2 1123.1 23 2002 29.4 3 2 1 0136.8 24 2003 84.2 2 1 0 0151.1 25 2004 58.0 1 0 0 0189.7 26 2005 136.8 0 0 0 0207.6 Le Samedi 11 Novembre 2006 20:11, amna khan a écrit : Respected Sir I request you to please fill the following read.table function and read.csvfor my understanding by assuming my data attached with this maiL, because I am fail to run these functions using manual guidlines. read.table(file, header = FALSE, sep = , quote = \', dec = ., row.names, col.names, as.is = !stringsAsFactors, na.strings = NA, colClasses = NA, nrows = -1, skip = 0, check.names = TRUE, fill = !blank.lines.skip, strip.white = FALSE, blank.lines.skip = TRUE, comment.char = #, allowEscapes = FALSE, flush = FALSE, stringsAsFactors = default.stringsAsFactors()) read.csv(file, header = TRUE, sep = ,, quote=\, dec=., fill = TRUE, comment.char=, ...) read.delim(file, header = TRUE, sep = \t, quote=\, dec=., fill = TRUE, comment.char=, ...) I shall be really thankful to you. REGARDS -- Nicolas Mazziotta __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
[R] Display problems X11 device
Hello, I am running R Version 2.3.1 (2006-06-01) on Kubuntu Edgy Eft 6.10 (problems appreared after upgrading from previous version, but I don't know which version of R was included then). I have very weird problems with X11 device: it seems that it cannot display correctly. For instance, x-1:10 plot(x) opens the X11 plotting window, but points are not displayed, only box tickmarks. The margin are missing too. However, if I input dev.print(pdf) R outputs a complete plot in a pdf file (with points, margins, etc.). Any idea? -- Nicolas Mazziotta __ R-help@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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] Display problems X11 device
Hello, I am running R Version 2.3.1 (2006-06-01) on Kubuntu Edgy Eft 6.10 (problems appreared after upgrading from previous version, but I don't know which version of R was included then). I have very weird problems with X11 device: it seems that it cannot display correctly. For instance, x-1:10 plot(x) opens the X11 plotting window, but points are not displayed, only box tickmarks. The margin are missing too. It seems to be an encoding problem: if I set LC_ALL=C (I used UTF-8) Plotting works well... But then, my data files (which are utf8) are not imported correctly any longer. Is it possible to use UTF-8, so that I don't have to change the environment before I launch R? -- Nicolas Mazziotta __ R-help@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 and provide commented, minimal, self-contained, reproducible code.