After reading in csv file which features a number within its filename, I would like to create a column in the dataframe called 'station_no' and populate each row with the number that forms part of the filename. The typical file format name can be seen below.
For example:
air_temp_df <- read_csv('data/2015.AT[AirTemperature].csv.zip', skip = 15) %>%
mutate(station_no = XXXXXX)
where xxxx is somewhere I would like the station_no column to be populated with multiple rows of 2015.
Thanks.