get_transfers: get_transfers

Description Usage Arguments Value Examples

View source: R/get_transfers.R

Description

This function scrappes a transfermarkt webpage to collect a data-frame table with all the transfers for a particular league, season and transfer window.

Usage

1
2
get_transfers(url, season = NULL, include_end_of_loans = TRUE,
  include_retired = TRUE, include_without_club = TRUE)

Arguments

url

The url for the relevant page to scrape. Example: 'https://www.transfermarkt.co.uk/premier-league/sommertransfers/wettbewerb/GB1'

season

The season year.

include_end_of_loans

Boolean value for whether to include or not players returning from loans in the results. Defaults to TRUE.

include_retired

Boolean value for whether to include or not players that retired. Defaults to TRUE.

include_without_club

Boolean value for whether to include or not players without club in the results. Defaults to TRUE.

Value

A data-frame where each row consists of a player transfer. The columns returned are From, To, Player, Age, Position, Position_Code, Market_Value, Market_Value_new, Fee, Fee_new, Transfer_Type, Transfer_Direction, Club, Club_Icon, League, Season_Scrapped, Date_Scrapped.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
tranfers_premierLeague = get_transfers(url = "https://www.transfermarkt.co.uk/premier-league/sommertransfers/wettbewerb/GB1",
                                     season = "2018",
                                     include_end_of_loans = TRUE,
                                     include_retired = TRUE,
                                     include_without_club = TRUE
                                     )



## End(Not run)

joaomicunha/transfermarktR documentation built on May 22, 2019, 2:44 p.m.