# 0.132 0.000 0.133
identical(res1,as.data.frame(dtNew))
#[1] TRUE
A.K.
----- Original Message -
From: Arnaud Michel
To: Berend Hasselman
Cc: R help
Sent: Thursday, July 25, 2013 3:59 AM
Subject: Re: [R] Change values in a dateframe-Speed TEST
Le 25/07/2013 08:50, Berend Hasselm
Le 25/07/2013 08:50, Berend Hasselman a écrit :
On 25-07-2013, at 08:35, Arnaud Michel wrote:
But I just noticed that the two solutions are not comparable :
the change concern only Nom and Prenom (solution Berend) and not also Sexe or
Date.de.naissance orother variables (solution Arun) that c
On 25-07-2013, at 08:35, Arnaud Michel wrote:
> But I just noticed that the two solutions are not comparable :
> the change concern only Nom and Prenom (solution Berend) and not also Sexe or
> Date.de.naissance orother variables (solution Arun) that can changed. But my
> question was badly put
But I just noticed that the two solutions are not comparable :
the change concern only Nom and Prenom (solution Berend) and not also
Sexe or Date.de.naissance orother variables (solution Arun) that can
changed. But my question was badly put.
Michel
Le 25/07/2013 08:06, Arnaud Michel a écrit :
Hi
For a dataframe with name PaysContrat1 and with
nrow(PaysContrat1)
[1] 52366
the test of system.time is :
system.time(droplevels(do.call(rbind,lapply(split(PaysContrat1,PaysContrat1$Matricule),
FUN=function(x) {x[,c("Nom","Prénom")] <-
x[nrow(x),c("Nom","Prénom"),drop=TRUE];x}
user
5 matches
Mail list logo