r count rows dataframe code example Example 1: r count dataframe df %>% count(column_to_check) Example 2: select number of row dataframe r df <- df[1:5,]