Sorry about this one but I can't find an easy solution to this.
I have a data frame:
>bla<-c(1)
>df<-data.frame(bla)
>df
bla
1 1
I want to append values to the bottom of the column (hence not create a new one, as explained here). For instance, get:
bla
1 1
2 2
3 3
4 4
5 5
I tried:
df[2,1]<-c(2,3,4,5)
df[,1]<-c(2,3,4,5)
but I get:
Error in `[<-.data.frame`(`*tmp*`, 2, 1, value = c(2, 3, 4, 5)) :
replacement has 4 rows, data has 1
Maybe dataframes are not appropriate and I should try with matrixes instead? Any suggestion would be much appreciated! :)