It would almost trivial to make a wrapper tha first captures attributes, runs
median, and then returns the Re-attribute-ed value.
David.
Sent from my iPhone
> On May 5, 2021, at 8:29 AM, Gustavo Zapata Wainberg
> wrote:
>
> Hi, thanks Dr. Mächler for your prompt response!
>
> I agree with
Hi, thanks Dr. Mächler for your prompt response!
I agree with your explanations about this issue. But I was thinking of
something like adding an argument to median() and mean() that could keep
the attributes of the variables if set to TRUE.
Thanks again.
Best regards
El mar, 4 may 2021 a las 17
> Gustavo Zapata Wainberg
> on Mon, 3 May 2021 20:48:49 +0200 writes:
> Hi!
> I'm wrinting this post because there is an inconsistency
> when median() is calculated for even or odd vectors. For
> odd vectors, attributes (such as labels added with Hmisc)
> are kept
Hi!
I'm wrinting this post because there is an inconsistency when median() is
calculated for even or odd vectors. For odd vectors, attributes (such as
labels added with Hmisc) are kept after running median(), but this is not
the case if the vector is even, in this last case attributes are lost.
I