My code is below:
df1 <- data.frame(attri = c(1, 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,
2,2,2, 3,3,3,3,3,3,3,3,3,3, 4, 5, 6,
7, 8, 9, 10, 11, 12, 13, 14, 15),
type = c(10, 14, 19, 25, 32, 33, 34, 35, 36,
37, 38, 39, 40, 41, 42,43, 44, 49,
55, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 60, 64, 69, 75, 72, 73, 74,
75, 76, 77, 78, 79))
i <- 1:3
df2 <- dplyr::filter(df1, attri==i)
View(df2)
When I run this, it outputs the following data frame:
attri type
1 1 10
2 1 25
3 1 34
4 1 37
5 2 38
6 2 41
7 2 44
8 2 52
9 3 53
10 3 56
11 3 59
12 3 62
How do I view the entire data set that satisfies the filter? Thanks in advance