Hi
the other possible option is to use split with suitable graphing technique
or with lapply and appropriate function
e.g.
boxplot(split(X, Y0))
histogram( ~ X|Y)
gives Marvin
[EMAIL PROTECTED] napsal dne 03.06.2008 21:11:29:
?by may be helpful here
eg if dat is your data.frame and yf is
Hi,
I have a data frame that I want to split into two based on the values of a
variable in it.
The variable Y has numeric values ranging between 0 through 70. I want to
plot the frequencies of another variable X in two different cases:
- When Y = 0 and
- When Y 0
How does one go about doing
?by may be helpful here
eg if dat is your data.frame and yf is a factor (created using ifelse)
use by(dat,yf,mean) to compute the means for each level of yf
hth, Ingmar
On Jun 3, 2008, at 8:37 PM, Marvin Lists wrote:
Hi,
I have a data frame that I want to split into two based on the
values
Also check ?aggregate
--- On Wed, 4/6/08, Ingmar Visser [EMAIL PROTECTED] wrote:
From: Ingmar Visser [EMAIL PROTECTED]
Subject: Re: [R] splitting data frame based on a criteria
To: Marvin Lists [EMAIL PROTECTED]
Cc: r-help@r-project.org
Received: Wednesday, 4 June, 2008, 5:11 AM
?by may
Or ?gsummary
Quoting Moshe Olshansky [EMAIL PROTECTED]:
Also check ?aggregate
--- On Wed, 4/6/08, Ingmar Visser [EMAIL PROTECTED] wrote:
From: Ingmar Visser [EMAIL PROTECTED]
Subject: Re: [R] splitting data frame based on a criteria
To: Marvin Lists [EMAIL PROTECTED]
Cc: r-help@r
5 matches
Mail list logo