Re: [Rd] Mistype in CRAN mirror list(doc/CRAN_mirrors.csv) (PR#7759)
On Wed, 30 Mar 2005 [EMAIL PROTECTED] wrote: Full_Name: Masafumi OKADA Version: 2.0.1 OS: Windows Submission from: (NULL) (130.158.158.65) In the list of CRAN mirrors($R_HOME/doc/CRAN_mirrors.csv), I found a mistyping. Mirror in University of Tsukuba is described as "Tsukaba", not "Tsukuba". I know "Tsukuba" is correct, because I'm webmaster of this mirror :-) It is so described in two of the four occurrences, fortunately not the most critical one, the URL (which is checked autmatically). Thanks, corrected now. For 2.1.0 these lists will be much more widely used, as all R users will be forced to choose a CRAN mirror. Current: "Japan (Tsukaba)",Japan,Tsukaba,http://cran.md.tsukuba.ac.jp/,"University of Tsukuba" Correct: "Japan (Tsukuba)",Japan,Tsukuba,http://cran.md.tsukuba.ac.jp/,"University of Tsukuba" -- Brian D. Ripley, [EMAIL PROTECTED] 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, UKFax: +44 1865 272595 __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Mistype in CRAN mirror list(doc/CRAN_mirrors.csv) (PR#7759)
Full_Name: Masafumi OKADA Version: 2.0.1 OS: Windows Submission from: (NULL) (130.158.158.65) In the list of CRAN mirrors($R_HOME/doc/CRAN_mirrors.csv), I found a mistyping. Mirror in University of Tsukuba is described as "Tsukaba", not "Tsukuba". I know "Tsukuba" is correct, because I'm webmaster of this mirror :-) Current: "Japan (Tsukaba)",Japan,Tsukaba,http://cran.md.tsukuba.ac.jp/,"University of Tsukuba" Correct: "Japan (Tsukuba)",Japan,Tsukuba,http://cran.md.tsukuba.ac.jp/,"University of Tsukuba" __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Preference for convenience and super value (PR#7758)
A better provider! It is your e-store for quality IINKS and superb benefits. Select from all top ones! Cut down the expenses significantly at emart. Select quick handling and dispensing that takes 2 to 3 days. Experience timely support and professional assistance. http://f.b.brightdew.com/ta/ Check our e-mart for top ones from Apple, Brother, Canon, Compaq, HP, Lexmark, NEC and others! Utk group the Guardian Angels.Tuesday morning, enko is calling for peac wife wasFo three days s E8 hy of her 57th wice the energy of an adult dog GOaai 0 Lags r Abbas, familiar ob 4 Cg __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] zapsmall (PR#7755)
On Tue, 29 Mar 2005 [EMAIL PROTECTED] wrote: Full_Name: Paul Vos Version: 2.0.1 OS: windows XP Submission from: (NULL) (150.216.148.20) zapsmall(.3-.2-.1,digits=7) [1] -2.775558e-17 This should be zero. Why `should' it? The documentation says: 'zapsmall' determines a 'digits' argument 'dr' for calling 'round(x, digits = dr)' such that values "close to zero" (compared with the maximal absolute one) are "zapped", i.e., treated as '0'. That value is not small compared with the maximal absolute one: it is equal to it. -- Brian D. Ripley, [EMAIL PROTECTED] 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, UKFax: +44 1865 272595 __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] zapsmall (PR#7755)
Full_Name: Paul Vos Version: 2.0.1 OS: windows XP Submission from: (NULL) (150.216.148.20) > zapsmall(.3-.2-.1,digits=7) [1] -2.775558e-17 This should be zero. By changing the condition if (mx > 0) in zapsmall to if (mx > 1) we get > zapsmall(.3-.2-.1,digits=7) [1] 0 __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] setAs between a new S4 class and "POSIXlt"
Dear R core team Please apologize for posting the same question twice on R-help and R-devel. Since I was not sure which list is appropriate I tried R-help (Tue Mar 22), but got no answer. Now I do not know if the formulation of my question was unclear or the question is not so easy to answer or to easy (what I do not hope). My problem: I create a new S4 class, containing one slot, data (of class POSIXlt). I tried to define a transformation via setAs() between the new S4 class and the existing "POSIXlt" class that is virtual S4 Class with subclass "POSIXt". Then using as() gives an error message (see code below) when I transform from "POSIXlt" to the new class. Then I defined another as() from the subclass "POSIXt" to the new class and now everything works well. This is the point where I do not understand what happens and why it works like this. I'd be happy for some hints to improve my understanding (maybe there is a help page or a reference). I'd be happy with a confirmation of a better connoisseur of R than me, that it is not so easy to understand, but correct, if that's the case. Thank you very much. Below I attached my R code. Regards, Christoph Buser -- Christoph Buser <[EMAIL PROTECTED]> Seminar fuer Statistik, LEO C11 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-5414 fax: 632-1228 http://stat.ethz.ch/~buser/ -- ## R Code: ## Definition of my new S4 class setClass("dtime", representation(data = "POSIXlt"), prototype(data = as.POSIXlt("2004/06/01"))) ## Transformation between the new class "dtime" and "POSIXlt" setAs("dtime", "POSIXlt", def = function(from) { [EMAIL PROTECTED] }) setAs("POSIXlt", "dtime", def = function(from) { new("dtime", data = from) }) ## Create a new "dtime" object (x1 <- new("dtime")) str(x1) ## Transformation from "dtime" to "POSIXlt" works well (y1 <- as(x1, "POSIXlt")) str(y1) ## Create a new "POSIXlt" object (y2 <- as.POSIXlt("2004/06/01")) str(y2) ## Transformation from "POSIXlt" to "dtime" fails as(y2, "dtime") > Fehler in insertMethod(methods, sig, args, def, TRUE) : inserting method into non-methods-list object (class "NULL") ## This works properly new("dtime", data = y2) ## Now I put another setAs for the Subclass "POSIXt" setAs("POSIXt", "dtime", def = function(from) { new("dtime", data = from) }) ## Now the transformation to "dtime" class works as(y2, "dtime") ## I am using: > version platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status alpha major2 minor1.0 year 2005 month03 day 24 language R __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] improved pairs.formula?
Dear Brian, > "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> writes: [...] BDR> Still not a description, just two examples. O.k., I believe that I slowly understand want you want. So in my book a description of "the job" would be: "that it is allowed to use '.' and '-' in the formula given to pairs thus allowing pairs.formula". BDR> Since later on you took a description to be an example, I see BDR> the confusion. Just to avoid future confusion, so how does one distinguish a description from an example, especially if the description is after the phrase "such as" BDR> and why you chose such an unusual piece of code to do it? >> Mmh, I don't think of it as being so unusual, most of it was >> gleaned from other R function. Well, I realise that R >> programing paradigms change over the years, so I must have >> gotten them from quite old routine. BDR> I guess you got it from an S not R function. Quite possible. Sorry, I can't check since I never had access to S. BDR> (E.g. what is the prescription for the ordering of terms, and BDR> why do you think the rownames of the factors and the BDR> variables might be in different orders? They are set the BDR> same in the C code.) >> In case that a user foolishly specifies a more complicated >> formula having not read the help pages. It seemed to me that >> this was the only construct to figure out which variables are >> actually appearing in terms of the formula. BDR> Really? Please check what I wrote: `variables' and `rownames BDR> of the factors' are always the same, apart from the response. BDR> Please show an example where you got something different. Sorry, seems to be some misunderstanding here. With 'variables' you mean the "variables" attribute of the object extracted by "mt <- attr(mf, "terms")" in my code? It is well possible that this is always in the same order as the rownames of the factors but I didn't find that in the documentation and I didn't study the C code to write this function. But I take your word for it and in this case I can see how the code could be simplified. Shall I submit a revised version or not bother? BDR> There are several places where only the allowed form of BDR> formulae is specified in this way. In this case, may I request that this places are better marked than they are at the moment? BDR> You are not allowed interactions, for example, and it refers BDR> to `each term'. Indeed, it states "Each term will give a separate variable in the pairs plot, so terms should be numeric vectors". So some users might be surprise that the following works: > dat <- data.frame(x=rnorm(30), y=rnorm(30), f=rep(c("A","B", "C"), 10)) > pairs(~x+y+f, dat) Who, but the most arduous student of R help page language would have thought that dat$f is a numeric vector? :-)) BDR> `.' is not documented to work (and used not to). So the question is whether it should remain this way or not. But that is for the R core team to decide and I shall stop my contributions to this thread now. Cheers, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Mathematics and Statistics+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009e-mail: [EMAIL PROTECTED] Australiahttp://www.maths.uwa.edu.au/~berwin __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] RGUI font problem (PR#7749)
On Mon, 28 Mar 2005, Duncan Murdoch wrote: > On Sun, 27 Mar 2005 14:18:27 -0500, "Christos Hatzis" > <[EMAIL PROTECTED]> wrote : > >> It is running on MDI mode (default). >> >> It appears that if I save the preferences in the default (My Documents) >> folder after I make the change, the problem disappears. I was just >> "Apply"-ing the changes and then "OK" without saving the new preferences >> first. As a result, I did not have an Rconsole file in My Documents. >> >> This might be the reason why the problem was not reproducible by the >> development team. > > I think there's still something else: I don't see it when I follow > your instructions above. This like PR#7277 fails for me in MDI mode but not SDI mode. I have tracked it down to editorsetfont (in editor.c) which does setfont(f). That is incorrect, as there is no current window, and there may be no editor windows at all. So it was setting the font on a random window and the effect will be unpredictable (and hence hard to fix). So the problem was introduced by the editor code in 2.0.0. > Duncan Murdoch > >> >> Thanks for you time. >> -Christos >> >> -Original Message- >> From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] >> Sent: Saturday, March 26, 2005 2:24 AM >> To: [EMAIL PROTECTED] >> Cc: r-devel@stat.math.ethz.ch; [EMAIL PROTECTED] >> Subject: Re: [Rd] RGUI font problem (PR#7749) >> >> This would appear to be the same as PR#7277. That too is not really >> reproducible. >> >> One possible crucial piece of missing information: is RGui being run in SDi >> or MDI mode? >> >> On Sat, 26 Mar 2005 [EMAIL PROTECTED] wrote: >> >>> Full_Name: Christos Hatzis >>> Version: 2.0.1 patched (2005-02-18) >>> OS: WinXP SP2 >>> Submission from: (NULL) (24.61.19.101) >>> >>> >>> I had encountered a similar problem when changing the font in the R >>> Console and then then open the graphics device by plot(), the console >> window whites out. >>> this might be related to bug report 7271. I mentioned it sometime >>> back and was told is was not reproducible. >>> >>> Now I have encountered a similar problem that does not appear to >>> relate to the graphics device. I started an R session, changed the font to >> size 8, Apply/OK. >>> Then I opened a help page by typing ?plot >>> the R help page opened in a different (system?) font and the font in >>> the console also changed to the same bold-face, non-proportional font. >>> Then when I typed another help command, the console completely blanked >> out. >> >> It is almost certainly not blank, just using the wrong foreground colour. >> >>> There seems to be some strange interaction going on between new >>> windows opened by the system and the font setting in the GUI preferences. >> >> Yes, and that is PR#7277. > > -- Brian D. Ripley, [EMAIL PROTECTED] 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, UKFax: +44 1865 272595 __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] RGUI font problem (PR#7749)
On Mon, 28 Mar 2005, Duncan Murdoch wrote: On Sun, 27 Mar 2005 14:18:27 -0500, "Christos Hatzis" <[EMAIL PROTECTED]> wrote : It is running on MDI mode (default). It appears that if I save the preferences in the default (My Documents) folder after I make the change, the problem disappears. I was just "Apply"-ing the changes and then "OK" without saving the new preferences first. As a result, I did not have an Rconsole file in My Documents. This might be the reason why the problem was not reproducible by the development team. I think there's still something else: I don't see it when I follow your instructions above. This like PR#7277 fails for me in MDI mode but not SDI mode. I have tracked it down to editorsetfont (in editor.c) which does setfont(f). That is incorrect, as there is no current window, and there may be no editor windows at all. So it was setting the font on a random window and the effect will be unpredictable (and hence hard to fix). So the problem was introduced by the editor code in 2.0.0. Duncan Murdoch Thanks for you time. -Christos -Original Message- From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] Sent: Saturday, March 26, 2005 2:24 AM To: [EMAIL PROTECTED] Cc: r-devel@stat.math.ethz.ch; [EMAIL PROTECTED] Subject: Re: [Rd] RGUI font problem (PR#7749) This would appear to be the same as PR#7277. That too is not really reproducible. One possible crucial piece of missing information: is RGui being run in SDi or MDI mode? On Sat, 26 Mar 2005 [EMAIL PROTECTED] wrote: Full_Name: Christos Hatzis Version: 2.0.1 patched (2005-02-18) OS: WinXP SP2 Submission from: (NULL) (24.61.19.101) I had encountered a similar problem when changing the font in the R Console and then then open the graphics device by plot(), the console window whites out. this might be related to bug report 7271. I mentioned it sometime back and was told is was not reproducible. Now I have encountered a similar problem that does not appear to relate to the graphics device. I started an R session, changed the font to size 8, Apply/OK. Then I opened a help page by typing ?plot the R help page opened in a different (system?) font and the font in the console also changed to the same bold-face, non-proportional font. Then when I typed another help command, the console completely blanked out. It is almost certainly not blank, just using the wrong foreground colour. There seems to be some strange interaction going on between new windows opened by the system and the font setting in the GUI preferences. Yes, and that is PR#7277. -- Brian D. Ripley, [EMAIL PROTECTED] 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, UKFax: +44 1865 272595 __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] improved pairs.formula?
On Tue, 29 Mar 2005, Berwin A Turlach wrote: Dear Brian, "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> writes: BDR> On Tue, 29 Mar 2005, Berwin A Turlach wrote: >> Dear all, >> >> I would like to suggest changing the pairs.formula command such >> that a command like >> [...] BDR> Perhaps you could explain what precisely 'the job' is Sorry, for not making it clear enough, must be that English is my second language. What I meant is, that with the above definition of pairs.formula a command like pairs(GNP ~ . - Year - GNP.deflator, longley) would only produce a pairwise scatterplot of GNP and all other variables in the dataframe except for Year and GNP.deflator. And, incidentally, so would pairs( ~ . - Year - GNP.deflator, longley) Still not a description, just two examples. Since later on you took a description to be an example, I see the confusion. BDR> and why you chose such an unusual piece of code to do it? Mmh, I don't think of it as being so unusual, most of it was gleaned from other R function. Well, I realise that R programing paradigms change over the years, so I must have gotten them from quite old routine. I guess you got it from an S not R function. BDR> (E.g. what is the prescription for the ordering of terms, and BDR> why do you think the rownames of the factors and the BDR> variables might be in different orders? They are set the BDR> same in the C code.) In case that a user foolishly specifies a more complicated formula having not read the help pages. It seemed to me that this was the only construct to figure out which variables are actually appearing in terms of the formula. Really? Please check what I wrote: `variables' and `rownames of the factors' are always the same, apart from the response. Please show an example where you got something different. BDR> BTW, the help page specifically warns against a formula of BDR> the type you specified. Does it? I searched the help page (R 2.0.1) for `.' and couldn't find anything about not using it in a formula. But then, again, perhaps I missed something with English being my second language.. BDR> Why do you want to allow a response? Why not, the current version allows it too. At least the help page in my version of R states: (A response will be interpreted as another variable, but not treated specially, so it is confusing to use one.) Actually, I noticed that the response variable will always be in the top row, so it is treated specially. Try it out and compare: pairs(longley) pairs(GNP ~ ., longley) Yes, but those are different pairs() methods. It is the same as pairs(~ GNP + ., longley), so it is not treated specially. BDR> Currently only '+' is documented to work. The help page for pairs in my version of R states: formula: a formula, such as '~ x + y + z'. Each term will give a separate variable in the pairs plot, so terms should be numeric vectors. (A response will be interpreted as another variable, but not treated specially, so it is confusing to use one.) I don't interpret this as "only '+' is documented to work". For me this is just an example of an allowed formula, but an exhaustive listing of those formulas that are allowed. But then, despite the danger of repeating myself, English is only my second language There are several places where only the allowed form of formulae is specified in this way. You are not allowed interactions, for example, and it refers to `each term'. `.' is not documented to work (and used not to). -- Brian D. Ripley, [EMAIL PROTECTED] 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, UKFax: +44 1865 272595 __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] improved pairs.formula?
Dear Brian, > "BDR" == Prof Brian Ripley <[EMAIL PROTECTED]> writes: BDR> On Tue, 29 Mar 2005, Berwin A Turlach wrote: >> Dear all, >> >> I would like to suggest changing the pairs.formula command such >> that a command like >> [...] BDR> Perhaps you could explain what precisely 'the job' is Sorry, for not making it clear enough, must be that English is my second language. What I meant is, that with the above definition of pairs.formula a command like pairs(GNP ~ . - Year - GNP.deflator, longley) would only produce a pairwise scatterplot of GNP and all other variables in the dataframe except for Year and GNP.deflator. And, incidentally, so would pairs( ~ . - Year - GNP.deflator, longley) BDR> and why you chose such an unusual piece of code to do it? Mmh, I don't think of it as being so unusual, most of it was gleaned from other R function. Well, I realise that R programing paradigms change over the years, so I must have gotten them from quite old routine. BDR> (E.g. what is the prescription for the ordering of terms, and BDR> why do you think the rownames of the factors and the BDR> variables might be in different orders? They are set the BDR> same in the C code.) In case that a user foolishly specifies a more complicated formula having not read the help pages. It seemed to me that this was the only construct to figure out which variables are actually appearing in terms of the formula. BDR> BTW, the help page specifically warns against a formula of BDR> the type you specified. Does it? I searched the help page (R 2.0.1) for `.' and couldn't find anything about not using it in a formula. But then, again, perhaps I missed something with English being my second language.. BDR> Why do you want to allow a response? Why not, the current version allows it too. At least the help page in my version of R states: (A response will be interpreted as another variable, but not treated specially, so it is confusing to use one.) Actually, I noticed that the response variable will always be in the top row, so it is treated specially. Try it out and compare: > pairs(longley) > pairs(GNP ~ ., longley) BDR> Currently only '+' is documented to work. The help page for pairs in my version of R states: formula: a formula, such as '~ x + y + z'. Each term will give a separate variable in the pairs plot, so terms should be numeric vectors. (A response will be interpreted as another variable, but not treated specially, so it is confusing to use one.) I don't interpret this as "only '+' is documented to work". For me this is just an example of an allowed formula, but an exhaustive listing of those formulas that are allowed. But then, despite the danger of repeating myself, English is only my second language Best wishes, Berwin == Full address Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Mathematics and Statistics+61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway Crawley WA 6009e-mail: [EMAIL PROTECTED] Australiahttp://www.maths.uwa.edu.au/~berwin __ R-devel@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-devel