Learn R Programming

indonesiaFootballScoutR (version 0.1.3)

clean_player_db: Clean and standardize football player data

Description

This function converts character-based numeric fields into numeric values and prepares player data for further analysis.

Usage

clean_player_db(df)

Value

A data frame with cleaned and standardized player data.

Arguments

df

A data frame containing raw football player data. Must include at least columns name, age, and market_value_est.

Details

The function performs safe numeric conversion and does not remove rows with missing values.

Examples

Run this code
df <- data.frame(
  name = c("Player A", "Player B"),
  age = c("21", "23"),
  market_value_est = c("€500k", "€750k"),
  club = c("Club A", "Club B"),
  league_country = c("Indonesia", "Indonesia"),
  stringsAsFactors = FALSE
)

clean_player_db(df)

Run the code above in your browser using DataLab