i can do the following:
a <- rep(5,5)
> cbind(6,a)
a
[1,] 6 5
[2,] 6 5
[3,] 6 5
[4,] 6 5
[5,] 6 5
> cbind(NULL,a)
a
[1,] 5
[2,] 5
[3,] 5
[4,] 5
[5,] 5
When i do it with a dataframe it gives me an error
> cbind(NULL,mtcars)
Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 0, 32
What is the neutral element so that:
cbind(neutralElement,DF) = DF
EDIT:
I have a code where something goes like cbind(IDCOL,DF). In the function IDCOL can also be non-Exisiting so it would be convinient to just set IDCOL to the neutral element so the code still runs smooth.