Skip to content
Back to formatted view

Raw Message

Message-ID: <CAH6117KU4rFg18335kqsf5pbE2eLHinFSR3JTV6h1eXReCHPVw@mail.gmail.com>
Date: 2019-12-23T17:14:53Z
From: Medic
Subject: Split

I have
mydata$var
#this is ONE group of patients

And I would like to get
median and ICR of mydata$var.

How can I get this?
With summary (mydata$var)!

Ok!

And now I would like to get THE SAME, but for TWO group: male and
female (which are contained in the group mydata$var)

How can I get this?
First I need to split mydata$var by mydata$sex, and then take:

summary (for male)
and
summary (for female)

That's all I want

Bert,
ave(mydata$var, madata$sex, FUN=median)
gives me:
[1] 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6 5.6
5.6 5.6 5.6 5.6
[21] 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0 6.0
6.0 6.0 6.0 6.0
What is it?
It is an endless(???) repetition of the median.
Moreover, there is no ICR.

Jeff,
your constructions are too complicated for me
===
P.S. Such simple thing and so difficult?! (I begin think about the Excel.)