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
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
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]