R tidyverse警告:`[`()`的`i`参数不能是tibble 3.0.0中的矩阵
当我想根据TIBLE中某个变量的平均值选择行时,会收到一条警告。请参阅下面的详细信息和警告。因此,我想知道是否有更简洁的解决方案 示例数据:R tidyverse警告:`[`()`的`i`参数不能是tibble 3.0.0中的矩阵,r,tidyverse,R,Tidyverse,当我想根据TIBLE中某个变量的平均值选择行时,会收到一条警告。请参阅下面的详细信息和警告。因此,我想知道是否有更简洁的解决方案 示例数据: x <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) y <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) z <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) xyz <- tibble(x, y, z) group1 <- xyz[xyz[2]
x <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
y <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
z <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
xyz <- tibble(x, y, z)
group1 <- xyz[xyz[2] < stats::median(purrr::as_vector(xyz$y), na.rm = TRUE), ]
xxyz%>%
过滤器(y
xyz %>%
filter(y < stats::median(y))