I want to expand a dataframe a from this :
data.frame(a = c(1,2,3),b = c(1,2,3))
a b
1 1 1
2 2 2
3 3 3
to this
data.frame(a = c(1,2,3),b = c(1,2,3), c = c(x,x,x))
a b c
1 1 1 x
2 2 2 x
3 3 3 x
is there a comand to add the row?
New contributor
Moritz Schulz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.