-1

I would like to learn how to count the amount of records associated with a variable. I have a real big dataset which has 2 types of users (casual & member), I want to know the total amount of rides a type of user asked for the service.

dataset

1

vimuth
  • 5,064
  • 33
  • 79
  • 116

1 Answers1

0

Here's an example with the iris dataset and data.table package.

library(data.table)
DT <- as.data.table(iris)
DT[, .(count = .N), by = Species]

https://rdatatable.gitlab.io/data.table/index.html

parmsam
  • 19
  • 3