标签: r
df2 <- data.frame(ID = 104:109, Salary = c(1150, 1390, 1500, 1550, 1350,1590))
当我只想查看ID为106,107、108的记录时,我会报错
df2[df2$ID == c(106,107,108),] [1] ID Salary <0 rows> (or 0-length row.names)
有人帮我吗?