Thanks for posting some of your data -- again, it is much easier to help if you paste in a copy and paste friendly format. Please look at the link I shared in my last post for help with this.
It looks like your data doesn't contain NAs, but rather empty strings "" so for the code to work, you would need to convert these "" to NA first.
library(tidyverse)
df <- tribble(
~Species, ~Synonym.Symbol, ~Duration,
"AUREO", "", "",
"BELLA", "", "",
"BRACH5", "", "",
"CASTI2", "", "",
"CAAFA2", "", "Perennial",
"CAAFA2", "CAAFC", "",
"CAAFA2", "CAAFI", ""
)
spe <- df %>%
mutate_at(vars(Synonym.Symbol, Duration), ~ if_else(.x == "", NA_character_, .x)) %>%
group_by(Species) %>%
fill(Duration, .direction = "updown") %>%
ungroup()
syn <- spe %>%
filter(!is.na(Synonym.Symbol)) %>%
select(Species = Synonym.Symbol, Duration)
spe %>%
select(Species, Duration) %>%
distinct() %>%
bind_rows(syn)
#> # A tibble: 7 x 2
#> Species Duration
#> <chr> <chr>
#> 1 AUREO <NA>
#> 2 BELLA <NA>
#> 3 BRACH5 <NA>
#> 4 CASTI2 <NA>
#> 5 CAAFA2 Perennial
#> 6 CAAFC Perennial
#> 7 CAAFI Perennial
Created on 2020-06-09 by the reprex package (v0.3.0)