Displaying 20 results from an estimated 10000 matches similar to: "cat(fill=N)"
2017 May 29
3
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Here is an attached patch.
Best,
Serguei.
Le 29/05/2017 ? 12:21, Serguei Sokol a ?crit :
> The problem or actual R implementation relies on an assumption
> that median(x[i] | x[i] <= quantile(x, 1/3)) == quantile(x, 1/6)
> which reveals not to be true despite very trustful appearance.
>
> If we continue with the example of x=y=1:9
> then quantile(x, 1/6)=2.5 (here quantile()
2018 Jan 22
3
Inconsistent rank in qr()
Le 22/01/2018 ? 17:40, Keith O'Hara a ?crit?:
> This behavior is noted in the qr documentation, no?
>
> rank - the rank of x as computed by the decomposition(*): always full rank in the LAPACK case.
For a me a "full rank matrix" is a matrix the rank of which is indeed min(nrow(A), ncol(A))
but here the meaning of "always is full rank" is somewhat confusing. Does it
2017 May 31
4
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Seriously, if a method gives a wrong result, it's wrong. line() does NOT
implement the algorithm of Tukey, even not after the patch. We're not
discussing Excel here, are we?
The method of Tukey is rather clear, and it is NOT using the default
quantile definition from the quantile function. Actually, it doesn't even
use quantiles to define the groups. It just says that the groups
2017 May 29
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
A usually trustworthy R correspondent posted a pure R implementation on SO at some point in his lost youth:
https://stackoverflow.com/questions/3224731/john-tukey-median-median-or-resistant-line-statistical-test-for-r-and-line
This one does indeed generate the line of identity for the (1:9, 1:9) case, so I do suspect that we have a genuine scr*wup in line().
Notice, incidentally, that
>
2017 May 30
3
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
>>>>> Serguei Sokol <sokol at insa-toulouse.fr>
>>>>> on Tue, 30 May 2017 16:01:17 +0200 writes:
> Le 30/05/2017 ? 09:33, Martin Maechler a ?crit : ...
>> However, even after the patch, The example from the SO
>> post differs from the result of Richie Cotton's
>> function...
> The explanation is quite simple.
2018 Jan 23
1
Inconsistent rank in qr()
Le 23/01/2018 ? 08:47, Martin Maechler a ?crit?:
>>>>>> Serguei Sokol <sokol at insa-toulouse.fr>
>>>>>> on Mon, 22 Jan 2018 17:57:47 +0100 writes:
> > Le 22/01/2018 ? 17:40, Keith O'Hara a ?crit?:
> >> This behavior is noted in the qr documentation, no?
> >>
> >> rank - the rank of x as
2020 Apr 16
6
suggestion: "." in [lsv]apply()
Hi,
I would like to make a suggestion for a small syntactic modification of
FUN argument in the family of functions [lsv]apply(). The idea is to
allow one-liner expressions without typing "function(item) {...}" to
surround them. The argument to the anonymous function is simply referred
as ".". Let take an example. With this new feature, the following call
2017 Jul 05
2
[New Patch] Fix disk corruption when writing
Le 05/07/2017 ? 13:09, Duncan Murdoch a ?crit :
> On 05/07/2017 5:26 AM, January W. wrote:
>> I tried the newest patch, but it does not seem to work for me (on
>> Linux). Despite the check in Rconn_printf, the write.csv happily writes
>> to /dev/full and does not report an error. When I added a printf("%d\n",
>> res); to the Rconn_printf() definition, I see
2018 Jan 22
2
Inconsistent rank in qr()
Hi,
I have noticed different rank values calculated by qr() depending on
LAPACK parameter. When it is FALSE (default) a true rank is estimated and returned.
Unfortunately, when LAPACK is set to TRUE, the min(nrow(A), ncol(A)) is returned
which is only occasionally a true rank.
Would not it be more consistent to replace the rank in the latter case by something
based on the following pseudo code ?
2020 Apr 16
2
suggestion: "." in [lsv]apply()
I'm sure this exists elsewhere, but, as a trade-off, could you achieve
what you want with a separate helper function F(expr) that constructs
the function you want to pass to [lsv]apply()? Something that would
allow you to write:
sapply(split(mtcars, mtcars$cyl), F(summary(lm(mpg ~ wt,.))$r.squared))
Such an F() function would apply elsewhere too.
/Henrik
On Thu, Apr 16, 2020 at 9:30 AM
2023 Jan 10
1
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
Le 10/01/2023 ? 11:37, Serguei Sokol a ?crit?:
> Le 10/01/2023 ? 10:44, RICHET Yann a ?crit?:
>> Dear R-devel people,
>>
>> We are working to submit a package which is mainly a binding over a
>> C++ lib (https://github.com/libKriging) using armadillo.
>> It is _not_ a standard RcppArmadillo package, because we also had to
>> provide a python binding... so
2020 Apr 17
2
suggestion: "." in [lsv]apply()
Thanks Simon,
Now, I see better your argument.
Le 16/04/2020 ? 22:48, Simon Urbanek a ?crit?:
> ... I'm not arguing against the principle, I'm arguing about your
> particular proposal as it is inconsistent and not general.
This sounds promising for me. May be in a (new?) future, R core will
come with a correct proposal for this principle?
Meanwhile, to avoid substitute(),
2023 Jan 10
1
rhub vs. CRAN fedora-*-devel, using armadillo & slapack
Le 10/01/2023 ? 10:44, RICHET Yann a ?crit?:
> Dear R-devel people,
>
> We are working to submit a package which is mainly a binding over a C++ lib (https://github.com/libKriging) using armadillo.
> It is _not_ a standard RcppArmadillo package, because we also had to provide a python binding... so there is a huge layer of cmake & scripting to make it work with a standard armadillo
2020 Apr 16
2
suggestion: "." in [lsv]apply()
Simon,
Thanks for replying. In what follows I won't try to argue (I understood
that you find this a bad idea) but I would like to make clearer some of
your point for me (and may be for others).
Le 16/04/2020 ? 16:48, Simon Urbanek a ?crit?:
> Serguei,
>> On 17/04/2020, at 2:24 AM, Sokol Serguei <sokol at insa-toulouse.fr>
>> wrote: Hi, I would like to make a
2020 Apr 20
1
suggestion: "." in [lsv]apply()
Le 19/04/2020 ? 20:46, Gabor Grothendieck a ?crit?:
> You can get pretty close to that already using fn$ in the gsubfn package:
>> library(gsubfn) fn$sapply(split(mtcars, mtcars$cyl), x ~
>> summary(lm(mpg ~ wt, x))$r.squared)
> 4 6 8 0.5086326 0.4645102 0.4229655
Right, I thought about similar syntax but this implementation has
similar flaws pointed by Simon, i.e. it reduces
2017 May 15
3
stopifnot() does not stop at first non-TRUE argument
Le 15/05/2017 ? 15:37, Martin Maechler a ?crit :
>>>>>> Serguei Sokol <sokol at insa-toulouse.fr>
>>>>>> on Mon, 15 May 2017 13:14:34 +0200 writes:
> > I see in the archives that the attachment cannot pass.
> > So, here is the code:
>
> [....... MM: I needed to reformat etc to match closely to
> the current
2018 Dec 04
3
Bug report: Function ppois(0:20, lambda=0.9) does not generate a non-decreasing result.
Le 04/12/2018 ? 11:27, I?aki Ucar a ?crit?:
> On Tue, 4 Dec 2018 at 11:12, <qweytr1 at mail.ustc.edu.cn> wrote:
>> function ppois is a function calculate the CDF of Poisson distribution, it should generate a non-decreasing result, but what I got is:
>>
>>> any(diff(ppois(0:19,lambda=0.9))<0)
>> [1] TRUE
>>
>> Actually,
>>
>>>
2017 May 31
2
stats::line() does not produce correct Tukey line when n mod 6 is 2 or 3
Le 31/05/2017 ? 17:30, Serguei Sokol a ?crit :
>
> More thorough reading revealed that I have overlooked this phrase in the
> line's doc: "left and right /thirds/ of the data" (emphasis is mine).
Oops. I have read the first ref returned by google and it happened to be
tibco's doc, not the R's one. The layout is very similar hence my mistake.
The latter does not
2018 Jan 18
1
wrong matrix dimension in sparseQR
Hi,
I came across a case when the dimensions of matrices returned by qr()
operated on a sparse matrix does not coincide with the initial matrix.
Here is a spinet code that should produce an example (one of many that I could provide):
?m=205
?n=199
?set.seed(7);
?a=matrix(rnorm(m*n), m, n)
?a[sample(seq(m*n), m*(n-4))]=0
?a=as(a, "Matrix")
?qa=qr(a);
?stopifnot(nrow(qa at R) ==
2017 May 15
4
stopifnot() does not stop at first non-TRUE argument
This is getting pretty convoluted.
The current behavior is consistent with the description at the top of
the help page -- it does not promise to stop evaluation once the first
non-TRUE is found. That seems OK to me -- if you want sequencing you
can use
stopifnot(A)
stopifnot(B)
or
stopifnot(A && B)
I could see an argument for a change that in the multiple argumetn
case reports _all_