Let's say we have a data frame like this
DataFrame ref = DataFrame::create( Named("sender") = sender , Named("receiver") = receiver);
the corresponding R code is as follows:
edge <- as.data.frame(edge) %>%
set_colnames(c("time", "sender", "receiver"))
edge <- rbind(c(0,0,0), edge)
ref <- data.frame(sender = rep(1:n, times = n),
receiver = rep(1:n, each = n)
) %>%
filter(sender != receiver) %>%
mutate(teller = 1:(n*(n-1)))
Some rows in this data frame have the same elements, say, 2 2, I want to find them and remove them from the data frame. Then I want to add another column to this data frame which is like numbers from 1 to the number of row of the new data frame.
Example:
