How to apply a function to multiple columns to create multiple new columns in R?
问题 I've this list of sequences aqi_range and a dataframe df : aqi_range = list(0:50,51:100,101:250) df PM10_mean PM10_min PM10_max PM2.5_mean PM2.5_min PM2.5_max 1 85.6 3 264 75.7 3 240 2 105. 6 243 76.4 3 191 3 95.8 19 287 48.4 8 134 4 85.5 50 166 64.8 32 103 5 55.9 24 117 46.7 19 77 6 37.5 6 116 31.3 3 87 7 26 5 69 15.5 3 49 8 82.3 34 169 49.6 25 120 9 170 68 272 133 67 201 10 254 189 323 226 173 269 Now I've created these two pretty simple functions that i want to apply to this dataframe to