包含标签:tidyverse 的文章
-
在 R 中使用来自 dplyr 的 %>% 运算符
我见过使用 R 中 dplyr(或 tidyverse)包中的 %>% 运算符对同一对象或数据框执行一系列操作的代码示例。但是,我从来没有能够让它为我自己的代码工作。例…… -
在 R 中拆分为两个类别
n <- 3 strata <- rep(1:4, each=n) y <- rnorm(n =12) x <- 1:12 category <- rep(c("A", "B", "C"), times = 4) df <- cbind.data.frame(……