Categories

Nov 14, 2019 in R Language
Q: Count function  in R language

1 Answer

Nov 14, 2019

Count observations by group is always a good idea. With R, you can aggregate the the number of occurence with n().

For instance, the code below computes the number of years played by each player.

# count observations
data % > %
	group_by(playerID) % > %
	summarise(number_year = n()) % > %
	arrange(desc(number_year))
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Nov 6, 2019 in R Language
Jul 28, 2019 in R Language
Nov 14, 2019 in R Language
...