You can use parse_number() and col_number() in the {readr} package to read your file with the correct specification:
library(readr)
parse_number(c("C54009", "554098"))
#> [1] 54009 554098
parse_number(c("342789c", "342980", "345820"))
#> [1] 342789 342980 345820
read_csv("a,b
C54009,342789c
554098,342980",
col_types = cols(a = col_number(),
b = col_number()))
#> # A tibble: 2 × 2
#> a b
#> <dbl> <dbl>
#> 1 54009 342789
#> 2 554098 342980
Created on 2022-06-30 by the reprex package (v2.0.1)