Dear R-nautes, I installed the 2.7.1 version of R and found it is not possible to modify graphical parameters with par(). for example;> par(mfrow=c(2,2))Error in c(2, 2) : unused argument(s) (2)> par$mfrowNULL Does any one know what is the cause of this problem? Regards, Fabio -- Fabio Sánchez, MD, MSc, PhD Unit of Dermatology and Venereology Department of Medicine Karolinska Institute SE-17176 Karolinska University Hospital Phone: +46 8 51772158 Fax: +46 8 51773620 [[alternative HTML version deleted]]
Fabio Sanchez wrote:> Dear R-nautes, > > I installed the 2.7.1 version of R and found it is not possible to modify > graphical parameters with par(). > > for example; > > >> par(mfrow=c(2,2)) >> > Error in c(2, 2) : unused argument(s) (2) >That's not an error from par(), it's an error from c(). I would assume c(2,2) would give you the same error. Most likely you have defined your own function c(), but if not, something is seriously wrong with your installation. Duncan Murdoch> >> par$mfrow >> > NULL > Does any one know what is the cause of this problem? > > Regards, > > Fabio > > ------------------------------------------------------------------------ > > ______________________________________________ > 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 Fabio Works OK for me.> par(mfrow=c(2,2)) > par("mfrow")[1] 2 2>But then I am using Windows ...> sessionInfo()R version 2.7.1 (2008-06-23) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 What are you using? Regards John --- -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Fabio Sanchez Sent: 23 July 2008 10:56 To: r-help at stat.math.ethz.ch Subject: [R] par() function does not work Dear R-nautes, I installed the 2.7.1 version of R and found it is not possible to modify graphical parameters with par(). for example;> par(mfrow=c(2,2))Error in c(2, 2) : unused argument(s) (2)> par$mfrowNULL Does any one know what is the cause of this problem? Regards, Fabio -- Fabio S?nchez, MD, MSc, PhD Unit of Dermatology and Venereology Department of Medicine Karolinska Institute SE-17176 Karolinska University Hospital Phone: +46 8 51772158 Fax: +46 8 51773620 [[alternative HTML version deleted]]
Fabio Sanchez wrote:> Dear R-nautes, > > I installed the 2.7.1 version of R and found it is not possible to modify > graphical parameters with par(). > > for example; > > >> par(mfrow=c(2,2)) >> > Error in c(2, 2) : unused argument(s) (2) > > >> par$mfrow >> > NULL > Does any one know what is the cause of this problem? >Accidental redefinition of the c() function? -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Did you start R with --vanilla to check that this is not something you have done? It is good practice, and I suspect will show you that you have mis-diagosed this problem. On Wed, 23 Jul 2008, Fabio Sanchez wrote:> Dear R-nautes, > > I installed the 2.7.1 version of R and found it is not possible to modify > graphical parameters with par(). > > for example; > >> par(mfrow=c(2,2)) > Error in c(2, 2) : unused argument(s) (2)That error is not from par() but from c(). I suspect you have defined a function c() in your workspace that is breaking your code.>> par$mfrow > NULLThat is not supposed to work. Perhaps you meant par()$mfrow?> Does any one know what is the cause of this problem? > > Regards, > > Fabio > -- > Fabio S?nchez, MD, MSc, PhD > Unit of Dermatology and Venereology > Department of Medicine > Karolinska Institute > SE-17176 Karolinska University Hospital > Phone: +46 8 51772158 > Fax: +46 8 51773620 > > [[alternative HTML version deleted]] > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Hi Fabio Have you used the name "c" for something else? Try typing in "c" at the command line, you should see something like:> cfunction (..., recursive = FALSE) .Primitive("c") Regards John --- for example;> par(mfrow=c(2,2))Error in c(2, 2) : unused argument(s) (2)> par$mfrowNULL Does any one know what is the cause of this problem? Regards,
Perhaps you have a function called 'par' in your workspace. On Wed, Jul 23, 2008 at 6:56 AM, Fabio Sanchez <Fabio.Sanchez at ki.se> wrote:> Dear R-nautes, > > I installed the 2.7.1 version of R and found it is not possible to modify > graphical parameters with par(). > > for example; > >> par(mfrow=c(2,2)) > Error in c(2, 2) : unused argument(s) (2) > >> par$mfrow > NULL > Does any one know what is the cause of this problem? > > Regards, > > Fabio > -- > Fabio S?nchez, MD, MSc, PhD > Unit of Dermatology and Venereology > Department of Medicine > Karolinska Institute > SE-17176 Karolinska University Hospital > Phone: +46 8 51772158 > Fax: +46 8 51773620 > > [[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. > >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O