On Mon, Oct 19, 2009 at 7:57 PM, Peng Yu <pengyu...@gmail.com> wrote:
> tmp <- matrix(1:2)
> tmp
> tmp[,1,drop=FALSE]
>
>
> See the above example. Is there a way to make 'drop=FALSE' as global
> default, so that when I say 'tmp[,1]', R will treat it as
> 'tmp[,1,drop=FALSE]'?

Is there a way to set drop=FALSE globally? I can't remember to put
drop=FALSE to all the '[]'s. But this indeed causes some weird bugs
for me to figure out.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to