;>> same result can be achieved by
> > >>>
> > >>> dat.ag<-aggregate(dat[ , c("DCE","DP")], by= list(dat$first.Name,
> dat$Name, dat$Department) , "I")
> > >>>
> > >>> Sorting according to the first row seems
; >>> Sorting according to the first row seems to be quite tricky. You could
> >>> probably get closer by using some combination of split and order and
> >>> arranging back chunks of data
> >>>
> >>> ooo1<-order(s
tricky. You could
> probably get closer by using some combination of split and order and
> arranging back chunks of data
> >>>
> >>> ooo1<-order(split(dat$DCE,interaction(dat$first.Name, dat$Name,
> dat$Department, drop=T))[[1]])
> >>> data.frame
dat$Name,
>>> dat$Department, drop=T))[[1]])
>>> data.frame(sapply(split(dat$DCE,interaction(dat$first.Name, dat$Name,
>>> dat$Department, drop=T)), rbind))[ooo1,]
>>> Ancient.Nation.QLH Amish.Wives.TAS Auction.Videos.YME
>>> 2
NA
> > 4 0.28 NA NA
> > 1 0.540.59 0.57
> > 3 0.540.59 0.57
> >
> > however I wonder why the order according to the first row is n
st row is necessary
> if all NAs are on correct positions?
> >
> > Cheers
> > Petr
> >
> >
> > > -Original Message-
> > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of David
> > > Winsemius
> > > Sent: Friday, No
0.59 0.57
> 3 0.540.59 0.57
>
> however I wonder why the order according to the first row is necessary if all
> NAs are on correct positions?
>
> Cheers
> Petr
>
>
> > -Original Message-
> >
0.540.59 0.57
>
> however I wonder why the order according to the first row is necessary if
> all NAs are on correct positions?
>
> Cheers
> Petr
>
>
> > -Original Message-
> > From: R-help [mailto:r-help-boun...@r-project.org]
necessary if all
NAs are on correct positions?
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of David
> Winsemius
> Sent: Friday, November 18, 2016 9:30 AM
> To: Karim Mezhoud
> Cc: r-help@r-project.org
> Subject: R
> On Nov 17, 2016, at 11:27 PM, Karim Mezhoud wrote:
>
> Dear all,
>
> the dat has missing values NA,
>
>first.Name Name Department DCE DP date
> 5 Auction VideosYME 0.57 0.56 2013-09-30
> 18 Amish WivesTAS 0.59 0.56 2013-09-30
> 34 Ancient Natio
Dear all,
the dat has missing values NA,
first.Name Name Department DCE DP date
5 Auction VideosYME 0.57 0.56 2013-09-30
18 Amish WivesTAS 0.59 0.56 2013-09-30
34 Ancient NationQLH 0.54 0.58 2013-09-30
53 Auction VideosYME NA
11 matches
Mail list logo