Displaying 8 results from an estimated 8 matches for "stevemartin041".
2023 Dec 17
1
zapsmall(x) for scalar x
Isn?t that the correct outcome? The user can change the number of digits if they want to see small values?
--
Change your thoughts and you change the world.
--Dr. Norman Vincent Peale
> On Dec 17, 2023, at 12:11?AM, Steve Martin <stevemartin041 at gmail.com> wrote:
>
> ?Zapping a vector of small numbers to zero would cause problems when
> printing the results of summary(). For example, if
> zapsmall(c(2.220446e-16, ..., 2.220446e-16)) == c(0, ..., 0) then
> print(summary(2.220446e-16), digits = 7) would print
> Min...
2023 Dec 17
2
[External] Re: zapsmall(x) for scalar x
...the correct outcome? The user can change the number of
> digits if they want to see small values?
> >
> >
> > --
> > Change your thoughts and you change the world.
> > --Dr. Norman Vincent Peale
> >
> >> On Dec 17, 2023, at 12:11?AM, Steve Martin <stevemartin041 at gmail.com>
> wrote:
> >>
> >> ?Zapping a vector of small numbers to zero would cause problems when
> >> printing the results of summary(). For example, if
> >> zapsmall(c(2.220446e-16, ..., 2.220446e-16)) == c(0, ..., 0) then
> >> print(summary(...
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
...outcome? The user can change the number of
>> digits if they want to see small values?
>>>
>>> --
>>> Change your thoughts and you change the world.
>>> --Dr. Norman Vincent Peale
>>>
>>>> On Dec 17, 2023, at 12:11?AM, Steve Martin <stevemartin041 at gmail.com>
>> wrote:
>>>> ?Zapping a vector of small numbers to zero would cause problems when
>>>> printing the results of summary(). For example, if
>>>> zapsmall(c(2.220446e-16, ..., 2.220446e-16)) == c(0, ..., 0) then
>>>> print(summar...
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
...t; digits if they want to see small values?
>>>>
>>>> --
>>>> Change your thoughts and you change the world.
>>>> --Dr. Norman Vincent Peale
>>>>
>>>>> On Dec 17, 2023, at 12:11?AM, Steve Martin <stevemartin041 at gmail.com>
>>> wrote:
>>>>> ?Zapping a vector of small numbers to zero would cause problems when
>>>>> printing the results of summary(). For example, if
>>>>> zapsmall(c(2.220446e-16, ..., 2.220446e-16)) == c(0, ..., 0) th...
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
...l values?
> >>>>
> >>>> --
> >>>> Change your thoughts and you change the world.
> >>>> --Dr. Norman Vincent Peale
> >>>>
> >>>>> On Dec 17, 2023, at 12:11?AM, Steve Martin <stevemartin041 at gmail.com>
> >>> wrote:
> >>>>> ?Zapping a vector of small numbers to zero would cause problems when
> >>>>> printing the results of summary(). For example, if
> >>>>> zapsmall(c(2.220446e-16, ..., 2.220446e...
2023 Dec 17
1
zapsmall(x) for scalar x
Zapping a vector of small numbers to zero would cause problems when
printing the results of summary(). For example, if
zapsmall(c(2.220446e-16, ..., 2.220446e-16)) == c(0, ..., 0) then
print(summary(2.220446e-16), digits = 7) would print
Min. 1st Qu. Median Mean 3rd Qu. Max.
0 0 0 0 0 0
The same problem can also appear when
2023 Mar 08
1
Augment base::replace(x, list, value) to allow list= to be a predicate?
That's an interesting example, as it's conceptually similar to what
Pavel is proposing, but structurally different. gsubfn() is more
complicated than a simple switch in the body of the function, and
wouldn't work well as an anonymous function.
Multiple dispatch can nicely encompass both of these cases. For replace(),
library(S7)
replace <- new_generic("replace",
2023 Dec 18
1
[External] Re: zapsmall(x) for scalar x
...;>
> > >>>> --
> > >>>> Change your thoughts and you change the world.
> > >>>> --Dr. Norman Vincent Peale
> > >>>>
> > >>>>> On Dec 17, 2023, at 12:11?AM, Steve Martin <
> stevemartin041 at gmail.com>
> > >>> wrote:
> > >>>>> ?Zapping a vector of small numbers to zero would cause
> problems when
> > >>>>> printing the results of summary(). For example, if
> > >>>>> zapsmall(c(2.2...