Bonjour,
Je suis à la recherche d'une fonction qui soit en mesure de combiner les lignes en doublons dans un data.frame.
Example:
J'ai un objet dont la colonne timestamp est au format POSIXct.
On remarque que certains timestamps sont identiques mais que les commentaires associés sont différents.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 > reg.status.90267[1:10,] timestamp status.code status.code.name breaking.program type incoming.phasing.out 1 2010-12-31 23:10:00 6500 Windspeeds not conformable BP 000 Warning phasing out 2 2010-12-31 17:30:00 6500 Windspeeds not conformable BP 000 Warning incoming 3 2010-12-31 17:00:00 6540 Anemometer frosted BP 052 Info incoming 4 2010-12-30 13:10:00 3225 Limit reactive power converter BP 000 Warning phasing out 5 2010-12-30 13:10:00 3225 Limit reactive power converter BP 000 Warning incoming 6 2010-12-30 13:10:00 710 Battery test BP 180 Info phasing out 7 2010-12-30 13:00:00 710 Battery test BP 180 Info incoming 8 2010-12-29 06:50:00 3225 Limit reactive power converter BP 000 Warning phasing out 9 2010-12-29 06:50:00 3225 Limit reactive power converter BP 000 Warning incoming 10 2010-12-29 00:50:00 10 Wind < start wind BP 050 Info phasing out
Pour chacun de ces timestamps de valeur identique, j'aimerais combiner les lignes et ainsi les commentaires, le tout sans perte d'informations.
Je sais que je n'y arriverais surement pas sans créer ma propre fonction, mais peut-être existe-t-il des packages ou astuces pour faire ce genre de choses.
Quelqu'un aurait-il une idée pour m'aider?
En vous remerciant par avance
Cordialement
Arnaud
Partager