我有以下 Dataframe
v=c(1, 2, 3)
df <- data.frame(V1 = randomNumbers(n = 18,min = 0,max = 1, col=1),
factor_col = c(rep("A", 18)),
sessions = rep(v, each=6))
v=c(1, 2, 3, 4, 5, 6, 7, 8)
df2 <- data.frame(V1 = randomNumbers(n = 24,min = 0,max = 1, col=1),
factor_col = c(rep("B", 24)),
sessions = rep(v, each=3))
v=c(1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12)
df3 <- data.frame(V1 = randomNumbers(n = 33,min = 0,max = 1, col=1),
factor_col = c(rep("C", 33)),
sessions = rep(v, each=3))
Table = bind_rows(df, df2)
Table = bind_rows(Table, df3)
字符串
如何筛选factor_col
的每个因子sessions
的两个最大值,并计算V1
在这两个激光会话中的平均值(每个factor_col
)?
谢谢你,谢谢
1条答案
按热度按时间ccrfmcuu1#
IIUC:
字符串