I have data such as this:
data_in <- read_table2("V1 v2 V3 V4 V5 V6 U1
3 8 30 60 9 30 ertr
0 0 0 50 9 50 rt
10 15 60min 50% 8 45 yt
0 5 32 250 yt
0 0 0 5 36 225 ertr
0 33 20 120 rt
100% 12 100 30 15 50 yt
0 0 0 25 18 25 yt
0 1 2 45 ertr
1 2 45% 1 36 30 min
1 36 50 yt
0 1 10 45 yt
1 36 60 ertr
0 0 0 100 16 100 rt
")
I want to replace the "%" and "min" with a blank space, for the columns V1:V6.
I have code such as this, but it's not doing what I want. I guess I don't quite understand how to execute the new "across" feature.
data_in %>% mutate(across(starts_with("V"),~gsub("%|min","")))
Any suggestions appreciated!