How to subset data for a specific column with ddply?

后端 未结 2 882
余生分开走
余生分开走 2021-01-20 23:41

I would like to know if there is a simple way to achieve what I describe below using ddply. My data frame describes an experiment with two conditions. Participants

2条回答
  •  暖寄归人
    2021-01-20 23:58

    Using dplyr package:

    library(dplyr)
    df %>%
      group_by(Condition) %>%
      summarise(N = n(),
                nAccurate = sum(Accuracy),
                RT = mean(RT[Accuracy == 1]))
    

提交回复
热议问题