I am downloading some data via R and the column that contains the year variable shows as “numeric with range undefined – undefined”. However, when I look at the column, it seems to be well defined: only (integer) numbers, going from 2000 to 2025, with no missing values whatsoever.
What may be the reason for that and how may I fix it? This seems to be a problem because when I use the year variable in ggplot on the x-axis, it shows weird values (see picture below, while this does not happen if I create a data.table with a well defined range for the year column).
Unfortunately I am not able to provide a reproducible example.