Vorrei escludere tutte le righe duplicate. Tuttavia, deve essere vero solo quando sono righe successive. Segue un esempio rappresentativo:Escludi righe duplicate successive
mio ingresso df
:
df <- "NAME VALUE
Prb1 0.05
Prb2 0.05
Prb3 0.05
Prb4 0.06
Prb5 0.06
Prb6 0.01
Prb7 0.10
Prb8 0.05"
df <- read.table(text=df, header=T)
mio previsto outdf
:
outdf <- "NAME VALUE
Prb1 0.05
Prb4 0.06
Prb6 0.01
Prb7 0.10
Prb8 0.05"
outdf <- read.table(text=df, header=T)