importing_cleaning <-function(file_name) { df <- file_name |>read_csv( #read csv first and skip the TEA heading linesskip =4) |>clean_names() |># clean names to make the names uniformmutate(enrollment =as.numeric(enrollment)) # change the column enrollment to a charcater for joining later}enrollment_all <- enrollment_file_list |>map(importing_cleaning) |>#map on our new functionlist_rbind()
Rows: 2440 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (7): Year, Region, County Name, District Name, District Number, Charter ...
dbl (1): Enrollment
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 2416 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (7): Year, Region, County Name, District Name, District Number, Charter ...
dbl (1): Enrollment
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 2408 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (7): Year, Region, County Name, District Name, District Number, Charter ...
dbl (1): Enrollment
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 2402 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (7): Year, Region, County Name, District Name, District Number, Charter ...
dbl (1): Enrollment
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 2406 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (7): YEAR, REGION, COUNTY NAME, DISTRICT NUMBER, DISTRICT NAME, GENDER, ...
dbl (1): ENROLLMENT
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 2407 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (8): YEAR, REGION, COUNTY NAME, DISTRICT NUMBER, DISTRICT NAME, GENDER, ...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `enrollment = as.numeric(enrollment)`.
Caused by warning:
! NAs introduced by coercion
Rows: 2411 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (8): YEAR, REGION, COUNTY NAME, DISTRICT NUMBER, DISTRICT NAME, CHARTER ...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `enrollment = as.numeric(enrollment)`.
Caused by warning:
! NAs introduced by coercion
Rows: 2417 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (8): YEAR, REGION, COUNTY NAME, DISTRICT NUMBER, DISTRICT NAME, CHARTER ...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `enrollment = as.numeric(enrollment)`.
Caused by warning:
! NAs introduced by coercion
Rows: 2421 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (8): YEAR, REGION, COUNTY NAME, DISTRICT NUMBER, DISTRICT NAME, CHARTER ...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `enrollment = as.numeric(enrollment)`.
Caused by warning:
! NAs introduced by coercion
Rows: 2417 Columns: 8
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (8): YEAR, REGION, COUNTY NAME, DISTRICT NUMBER, DISTRICT NAME, CHARTER ...
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning: There was 1 warning in `mutate()`.
ℹ In argument: `enrollment = as.numeric(enrollment)`.
Caused by warning:
! NAs introduced by coercion