[R] Is there a way to specify drop=FALSE as the global default?

Peng Yu pengyu.ut at gmail.com
Tue Oct 20 03:57:25 CEST 2009


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]'?




More information about the R-help mailing list