in R Language by
Q:
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))
Click here to read more about Loan/Mortgage
Click here to read more about Insurance

Related questions

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