in R Language by
Q:
First and last inR language

▼ Show 1 Answer

0 votes
by

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))
Learn More with Madanswer

Related questions

...