Turn the vector to dataframe and use dplyr::bind_rows
:
df <- data.frame(a = 1, b = 2, c = 4, d = 5, e = 6)
k_koef <- c(a = 1.1, c = 4.5, e = 4.5)
dplyr::bind_rows(df, as.data.frame(t(k_koef)))
# a b c d e
#1 1.0 2 4.0 5 6.0
#2 1.1 NA 4.5 NA 4.5
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…