df <-data.frame(x=1:2,y=5:6)
row <- list(x=10,y=20)
add_row(df,row)
Error: New rows can't add columns.
x Can't find column row
in .data
.
Run rlang::last_error()
to see where the error occurred.
but
add_row(df,x=10,y=20)
x y
1 1 5
2 2 6
3 10 20
works. Please help me add named list into df?