7
如何用一组值替换NA
我有以下数据框: library(dplyr) library(tibble) df <- tibble( source = c("a", "b", "c", "d", "e"), score = c(10, 5, NA, 3, NA ) ) df 看起来像这样: # A tibble: 5 x 2 source score <chr> <dbl> 1 a 10 . # current max value 2 b 5 3 c NA 4 d …