On Sun, Feb 20, 2011 at 5:55 PM, Dmitry Berman <ravenblur@gmail.com> wrote:

> Listers,
>
> I have a simple matrix:
>
> ----------------------------------
> m <-c(1:7)
> m <- cbind(m)
>
> m
> [1,] 1
> [2,] 2
> [3,] 3
> [4,] 4
> [5,] 5
> [6,] 6
> [7,] 7
> -----------------------------------
>
> I want to add a second column using:
>
>
>
m[,2] <- cbind(m,8:14)
But I get the error:
Error in m[, 2] <- cbind(m, 8:14) : subscript out of bounds

What am I doing wrong?

Thanks

	[[alternative HTML version deleted]]

