Мы можем использовать map_if
library(purrr)
map_if(g, names(g) == 'food', ~ c(.x, 'asparagus'))
#$vegetable
#[1] "carrot"
#$food
#[1] "steak" "eggs" "asparagus"
#$numbers
#[1] 4 2 1 7
Или с modifyList
из base R
modifyList(g, list(food = c(g[['food']], 'asparagus')))
#$vegetable
#[1] "carrot"
#$food
#[1] "steak" "eggs" "asparagus"
#$numbers
#[1] 4 2 1 7