Re: [R] Query: matrix definition

2011-02-21 Thread jim holtman
By careful programming practices you should be able to avoid the problem. There is no way to prevent it since the program is only doing what you ask it to do and if you make a mistake and ask it do to something, it is not the program's fault. One of the nice things (& bad things) about R is that

[R] Query: matrix definition

2011-02-21 Thread Stefano Sofia
Dear list users, if within a function I first define a matrix mymat <- matrix(NA, nrow=m, ncol=n) and somewhere afterwards by mistake mymat <- c(1,2,3) this second command deletes the first one. How can I make sure that within the function mymat will always remain the matrix defined at the beginni