📜  堆栈溢出 R susbsetting - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:03.642000             🧑  作者: Mango

代码示例1
scramble <- function(x) x[sample(nrow(x)), ]

subscramble <- function(x, condition) {
  scramble(subset(x, condition))
}

subscramble(mtcars, cyl == 4)