MAIL PROTECTED] On Behalf Of Liaw, Andy
> Sent: July 1, 2005 8:31 AM
> To: 'Martin Henry H. Stevens'; R-Help
> Subject: Re: [R] Simple indexing conundrum
>
> Is this close to what you want?
>
>> air.sub <- do.call("rbind", lapply(split(airquality,
>> a
21 259 15.5 76 9 12
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Liaw, Andy
Sent: July 1, 2005 8:31 AM
To: 'Martin Henry H. Stevens'; R-Help
Subject: Re: [R] Simple indexing conundrum
Is this close to what you want?
> air.sub <
Is this close to what you want?
> air.sub <- do.call("rbind", lapply(split(airquality, airquality$Month),
+function(d) d[which.max(d$Solar.R),]))
> air.sub
Ozone Solar.R Wind Temp Month Day
514 334 11.5 64 5 16
6NA 332 13.8 80 6
My apologies in advance for my thickness but I can't seem to solve the
following, seemingly simple, data manipulation problem:
I have a data frame that contains multiple factors and multiple
continuous response variables, but duplicates of some factor
combinations. The duplicates contain bad da