Efficient functional programming (using mapply) in R for a “naturally” procedural problem

后端 未结 5 1846
独厮守ぢ
独厮守ぢ 2021-01-07 11:43

A common use case in R (at least for me) is identifying observations in a data frame that have some characteristic that depends on the values in some subset of other observa

5条回答
  •  北荒
    北荒 (楼主)
    2021-01-07 12:20

    remove <- with(raw, as.logical(ave(Iteration, WorkerId, FUN=function(x) c(rep(TRUE, length(x)-1), FALSE)))))
    

提交回复
热议问题