0 votes
in R Language by
First and last inR language

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

Related questions

0 votes
asked Nov 14, 2019 in R Language by MBarbieri
0 votes
asked Nov 14, 2019 in R Language by MBarbieri
...