Categories

Nov 14, 2019 in R Language

Q: First and last inR language

1 Answer

Nov 14, 2019

You can select the first, last or nth position of a group.

For instance, you can find the first and last year of each player.

# first and last
data % > %
	group_by(playerID) % > %
	summarise(first_appearance = first(yearID),
		last_appearance = last(yearID))
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

Madanswer
Nov 14, 2019 in R Language
Nov 14, 2019 in R Language
Nov 14, 2019 in R Language
...