Say I have the following data:
假设我有以下数据:
library(dplyr)
year <- rep(c(1,2,2,3,4,4,5),3)
group <- c(rep(1,7),rep(2,7),rep(3,7))
v1 <- rep(c(0,1,2,3,4,5,6),3)
v2 <- rep(c(1,2,3,4,5,6,7),3)
df <- data.frame(year,group,v1,v2)
liSay I have the following data:
假设我有以下数据:
library(dplyr)
year <- rep(c(1,2,2,3,4,4,5),3)
group <- c(rep(1,7),rep(2,7),rep(3,7))
v1 <- rep(c(0,1,2,3,4,5,6),3)
v2 <- rep(c(1,2,3,4,5,6,7),3)
df <- data.frame(year,group,v1,v2)
li