In my dataset, I want to count the number of times each row appears in my dataset, which consists of five columns. I tried using table; however, this seems to only work with seeing how many times one column, not multiple, is duplicated since I get the error
attempt to make a table with >= 2^31 elements
As a quick example, say my dataframe is as follows:
dat <- data.frame(
SSN = c(204,401,204,666,401),
Name=c("Blossum","Buttercup","Blossum","MojoJojo","Buttercup"),
Age = c(7,8,7,43,8),
Gender = c(0,0,0,1,0)
)
How do I add another column with how many times each row appears in this dataframe?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…