Count number of rows matching a criteria

后端 未结 8 887
渐次进展
渐次进展 2020-11-29 05:01

I am looking for a command in R which is equivalent of this SQL statement. I want this to be a very simple basic solution without using complex functions OR dplyr type of pa

8条回答
  •  谎友^
    谎友^ (楼主)
    2020-11-29 05:43

    to get the number of observations the number of rows from your Dataset would be more valid:

    nrow(dat[dat$sCode == "CA",])
    

提交回复
热议问题