Hi all,
Can anyone explain why the following use of
the subset() function produces a different
outcome than the use of the [ extractor?
The subset() function as used in
density(subset(mydf, ht = 150.0 wt = 150.0, select = c(age)))
appears to me from documentation to be equivalent to
Steven,
check the class of the objects that you are creating.
Cheers,
Andrew
On Wed, January 21, 2009 10:02 am, Steven McKinney wrote:
Hi all,
Can anyone explain why the following use of
the subset() function produces a different
outcome than the use of the [ extractor?
The subset()
on 01/20/2009 05:02 PM Steven McKinney wrote:
Hi all,
Can anyone explain why the following use of
the subset() function produces a different
outcome than the use of the [ extractor?
The subset() function as used in
density(subset(mydf, ht = 150.0 wt = 150.0, select = c(age)))
Here
Consider an alternative and realize that it is density() that is
complaining about being passed a dataframe rather than subset
misbehaving:
density(subset(mydf, ht = 150.0 wt = 150.0)$age)
Call:
density.default(x = subset(mydf, ht = 150 wt = 150)$age)
Data: subset(mydf, ht = 150
, Floor 4
Vancouver B.C.
V5Z 1L3
Canada
-Original Message-
From: Marc Schwartz [mailto:marc_schwa...@comcast.net]
Sent: Tue 1/20/2009 3:20 PM
To: Steven McKinney
Cc: R-help@r-project.org
Subject: Re: [R] Problem with subset() function?
on 01/20/2009 05:02 PM Steven McKinney wrote:
Hi all
5 matches
Mail list logo