Re: [Rd] meaning of "trim" in mean()
If the sentence in question were amended to: Values of trim outside that range ... then I think it would rule out the misinterpretation of the sentence. Pat Prof Brian Ripley wrote: >There is only one _range_ mentioned, (0, 0.5). I don't see how you can >construe 'that range' to be a reference to anything other than (0, 0.5). > >And why do you suppose the description for argument 'trim' is referring to >'values' of a different argument? > >It is telling you what happens for values of trim < 0 or > 0.5: that is >not information that it is appropriate to excise. > > >On Thu, 25 Oct 2007, Peter Dalgaard wrote: > > > >>Liaw, Andy wrote: >> >> >>>(I see this in both R-patched r43124 and R-devel r43233.) >>>In the Argument section of ?mean: >>> >>>trim the fraction (0 to 0.5) of observations to be trimmed from each >>>end of x before the mean is computed. Values outside that range are >>>taken as the nearest endpoint. >>> >>>Then in the Value section: >>> >>>If trim is non-zero, a symmetrically trimmed mean is computed with a >>>fraction of trim observations deleted from each end before the mean is >>>computed. >>> >>>The description in "trim" to me sounds like Windsorizing, rather than >>>trimming. Should that be edited? >>> >>> >>> >>> >>I think so: >> >> >> >>>x <- sort(rnorm(10)) >>>mean(x,trim=.1) >>> >>> >>[1] -0.6387413 >> >> >>>mean(x[2:9]) >>> >>> >>[1] -0.6387413 >> >> >>>mean(x[c(2,2:9,9)]) # Winsorizing >>> >>> >>[1] -0.6204222 >> >>So yes, it is trimming, not Winsorizing, and the last sentence in the >>description of "trim" is misleading and should be, well..., trimmed. >> >> >> >> > > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R-devel Digest, Vol 56, Issue 27
Dear R expert: I have the problems with calling R from Java on Windows XP_SP2/Eclipse3.1/JDK1.5 problems: Loading RInterpreter library Exception in thread "main" java.lang.UnsatisfiedLinkError: no RInterpreter in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at org.omegahat.R.Java.ROmegahatInterpreter.(ROmegahatInterpreter.java:28) at org.omegahat.R.Java.Examples.lmTest.main(lmTest.java:8) and Exception in thread "main" java.lang.UnsatisfiedLinkError: no SJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at org.omegahat.R.Java.RForeignReference.(RForeignReference.java:22) at ne.Test.main(Test.java:11) help me!Thanks! name:wanghu(from china) [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Using SJava? (was R-devel Digest, Vol 56, Issue 27)
The error is: Exception in thread "main" java.lang.UnsatisfiedLinkError: no SJava in java.library.path so this is most likely an error in the package you are using (SJava?), not in R. Please do read and follow the R posting guide at http://www.r-project.org/posting-guide.html (including using a reasonable subject line). On Sun, 28 Oct 2007, Íõ»¢ wrote: Dear R expert: I have the problems with calling R from Java on Windows XP_SP2/Eclipse3.1/JDK1.5 problems: Loading RInterpreter library Exception in thread "main" java.lang.UnsatisfiedLinkError: no RInterpreter in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at org.omegahat.R.Java.ROmegahatInterpreter.(ROmegahatInterpreter.java:28) at org.omegahat.R.Java.Examples.lmTest.main(lmTest.java:8) and Exception in thread "main" java.lang.UnsatisfiedLinkError: no SJava in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682) at java.lang.Runtime.loadLibrary0(Runtime.java:822) at java.lang.System.loadLibrary(System.java:992) at org.omegahat.R.Java.RForeignReference.(RForeignReference.java:22) at ne.Test.main(Test.java:11) help me!Thanks! name:wanghu(from china) [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- 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@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] meaning of "trim" in mean()
Patrick Burns wrote: > If the sentence in question were amended to: > > Values of trim outside that range ... > > then I think it would rule out the misinterpretation of > the sentence. Yup. And I maintain that although the wording may not be technically ambiguous, the whole operation is about restricting the range of x, and therefore is easy to interpolate "the range of x after trimming from each end". > > Pat > > > Prof Brian Ripley wrote: > >> There is only one _range_ mentioned, (0, 0.5). I don't see how you >> can construe 'that range' to be a reference to anything other than >> (0, 0.5). >> >> And why do you suppose the description for argument 'trim' is >> referring to 'values' of a different argument? >> >> It is telling you what happens for values of trim < 0 or > 0.5: that >> is not information that it is appropriate to excise. >> >> >> On Thu, 25 Oct 2007, Peter Dalgaard wrote: >> >> >> >>> Liaw, Andy wrote: >>> (I see this in both R-patched r43124 and R-devel r43233.) In the Argument section of ?mean: trim the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values outside that range are taken as the nearest endpoint. Then in the Value section: If trim is non-zero, a symmetrically trimmed mean is computed with a fraction of trim observations deleted from each end before the mean is computed. The description in "trim" to me sounds like Windsorizing, rather than trimming. Should that be edited? >>> I think so: >>> >>> x <- sort(rnorm(10)) mean(x,trim=.1) >>> [1] -0.6387413 >>> mean(x[2:9]) >>> [1] -0.6387413 >>> mean(x[c(2,2:9,9)]) # Winsorizing >>> [1] -0.6204222 >>> >>> So yes, it is trimming, not Winsorizing, and the last sentence in the >>> description of "trim" is misleading and should be, well..., trimmed. >>> >>> >>> >> >> >> -- 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 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] meaning of "trim" in mean()
On 28/10/2007 4:43 AM, Patrick Burns wrote: > If the sentence in question were amended to: > > Values of trim outside that range ... > > then I think it would rule out the misinterpretation of > the sentence. Good suggestion. I've changed it. Duncan Murdoch > > Pat > > > Prof Brian Ripley wrote: > >> There is only one _range_ mentioned, (0, 0.5). I don't see how you can >> construe 'that range' to be a reference to anything other than (0, 0.5). >> >> And why do you suppose the description for argument 'trim' is referring to >> 'values' of a different argument? >> >> It is telling you what happens for values of trim < 0 or > 0.5: that is >> not information that it is appropriate to excise. >> >> >> On Thu, 25 Oct 2007, Peter Dalgaard wrote: >> >> >> >>> Liaw, Andy wrote: >>> >>> (I see this in both R-patched r43124 and R-devel r43233.) In the Argument section of ?mean: trim the fraction (0 to 0.5) of observations to be trimmed from each end of x before the mean is computed. Values outside that range are taken as the nearest endpoint. Then in the Value section: If trim is non-zero, a symmetrically trimmed mean is computed with a fraction of trim observations deleted from each end before the mean is computed. The description in "trim" to me sounds like Windsorizing, rather than trimming. Should that be edited? >>> I think so: >>> >>> >>> x <- sort(rnorm(10)) mean(x,trim=.1) >>> [1] -0.6387413 >>> >>> mean(x[2:9]) >>> [1] -0.6387413 >>> >>> mean(x[c(2,2:9,9)]) # Winsorizing >>> [1] -0.6204222 >>> >>> So yes, it is trimming, not Winsorizing, and the last sentence in the >>> description of "trim" is misleading and should be, well..., trimmed. >>> >>> >>> >>> >> >> > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel