Hello
I would like to rename chr label in a column :
df %>%
filter(station == A1 & date == "xxxx-xx-xx")
I would like to rename the name of this station according to this filter.
I have infact several station named A1 but not having the same date. So I would like to rename these names
But I don't know what to do after this code
I would make a new column by doing something like df %>% dplyr::mutate(unique_station_date = paste(station, date, sep = '_')). Then you can use tidyr::pivot_wider on that new column to transform that column to names. There may be a better way to do this, but without a sample of your data it's hard to know.
So I want to distinct all my station considering the others column. Like the station A1 I want have A1(a) and A1(b) because they don't have the same date, I want A4(a) and A4(b) because they don't have the same depth.
And I have others differences like that
Great, thank you !
How to make it apply only to specific columns?
For example if I have columns of environmental variables and I only want to distinguish my stations in relation to the date, depth and time columns for example?